Skip to content

Instantly share code, notes, and snippets.

@lambda-mike
Last active May 30, 2021 16:50
Show Gist options
  • Save lambda-mike/b9ad6b1f73b9f7b0196649da8fb3435a to your computer and use it in GitHub Desktop.
Save lambda-mike/b9ad6b1f73b9f7b0196649da8fb3435a to your computer and use it in GitHub Desktop.
My GNU screen cheatsheet

screen

screen –ls – list available sessions

screen -S tux – create named session

screen –r [pid/name] – reattach to latest/pid/name

screen –dR name – create or (detach and reattach) session name

screen -dRR chrisbinnie-linux - as above, use the first session if many available

screen –L – log to file

Shortcuts

Ctrl+a ? - help

Ctrl+a d – detach

Ctrl+a A – rename window

Ctrl+a x – lock session with password

Ctrl+a k – kill window

Ctrl+a H – enable logging to file

Ctrl+a ' – select window

Ctrl+a " – list windows

Ctrl+a a – toggle windows

Ctrl+a : - cmd window:

Ctrl-a Ctrl-[ - Enter copy mode, start selectino, copy and leave the mode, Vim bindings work

Cmds

Start with C-a :

resize +20

resize 20%

resize -b =

Tips

hardcopy -h file-dump

screen -S PingWWW -d -m ping web.tux.tld

Launch a session called “PingWWW” and use it to launch the ping command to check if a host is responding.

screen //telnet switch.tux.tld 23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment