improve screen and computer tuto

This commit is contained in:
hugogogo
2026-11-24 12:15:11 +01:00
parent 6860151b8d
commit 5e3432f367
2 changed files with 44 additions and 31 deletions
+5
View File
@@ -14,6 +14,11 @@
**sftp -P XXXX username@ssh.server.domain** se connecter a un server ssh avec le protocol ftp
**vim scp://username@ssh.server.domain:XXXX//home/path/to/file** edit a remote file from local vim
**ctrl+r** history search
**sudo !!** "!!" is last command
**alt+.** reuse last argument
**cd -** go bakc to previous folder
**ssh to server :**
**ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_hugo2lejourdesprofs -C "hugo2lejourdesprofs"** :
- creates a key of type ed25519 (more secure than rsa),
+39 -31
View File
@@ -1,36 +1,44 @@
**screen** sudo apt-get install screen pour avoir plusieurs terminals
**ctrl-a |** split vertically
**ctrl-a S** split horizontally
**ctrl-a Q** unsplit all
**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 d** get out of screen
**screen -ls** see list of sessions
**screen -XS 42353 quit** -X execute command, -S session PID to execute on, five digit number specific at the session
**ctrl-a d** get out of screen without killing it
**screen -r** to recover last session
**screen -r <name/number_before_point>** to recover a specific session
**ctrl-a tab** switch from one splited window to another
**ctrl-a n** or **p** move to the next or previous windows
**ctrl-a c** start new terminal (in the new window)
**screen** prompt command "screen" to open a new window in the same directory
**ctrl-a space** next terminal
**ctrl-a backspace** previous terminal
**ctrl-a ctrl a** flip flop between to terminal
**ctrl-a "** switch between terminal with a list
**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)
**ctrl-a :** enter command line
** scrollback 10000** set number of line in the buffer
**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
**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