45 lines
2.2 KiB
Plaintext
45 lines
2.2 KiB
Plaintext
**screen** sudo apt-get install screen pour avoir plusieurs terminals
|
|
**from outside screen session :**
|
|
**screen** : launch a session
|
|
**screen -S "name"** : launch a session with a name
|
|
**screen -ls** : list sessions, output :
|
|
487598.pts-0.vmi3634388 (11/24/26 11:33:15) (Detached)
|
|
487288.pts-0.vmi3634388 (11/24/26 11:28:13) (Detached)
|
|
487960.test (11/24/26 11:37:37) (Detached)
|
|
**screen -r** : reattach a session when there is just one
|
|
**screen -r 487598** : reattach a specific session
|
|
**screen -r test** : reattach a session by its name
|
|
**screen -d -r** : detach elsewhere (eg. other computer) and reattach here
|
|
**screen -S name -X quit** : to kill a session
|
|
**from inside screen session :**
|
|
**screen** : prompt command "screen" to open a new window in the same directory
|
|
**ctrl-a c** : start new terminal (in the new window)
|
|
**ctrl-a :** : enter command line
|
|
** scrollback 10000** : set number of line in the buffer
|
|
**ctrl-a ctrl a** : flip flop between to terminal
|
|
**ctrl-a d** : detache, get out of screen session without killing it
|
|
**ctrl-a X** : close current pane
|
|
**ctrl-a K** : kill current pane
|
|
**ctrl-a \** : kill all sessions (if it doesn't work see below)
|
|
**ctrl-a |** : split vertically
|
|
**ctrl-a S** : split horizontally
|
|
**ctrl-a Q** : unsplit all
|
|
**ctrl-a tab** : switch from one splited window to another
|
|
**ctrl-a n** or **p** : move to the next or previous windows
|
|
**ctrl-a space** : next terminal
|
|
**ctrl-a backspace** : previous terminal
|
|
**ctrl-a "** : switch between terminal with a list
|
|
**,** move windows number down
|
|
**.** move windows number up
|
|
**ctrl-a A** : rename
|
|
**ctrl-a l** : resize
|
|
**ctrl-a w** : show windows name
|
|
**ctrl-a esc** : go in scroll mode (press esc again to axit)
|
|
|
|
to configure actions when launch :
|
|
**vim ~/.screenrc** : go to or create file screenrc, then write inside:
|
|
**startup_message off** : avoid message at start
|
|
**chdir -directorie-** : change the working directorie
|
|
**screen -t -name- -action-** : start a windows with a name and execute action (for example: screen -t shell vim /Bureau/fiche/chell.txt)
|
|
**focus** : focus on next screen
|