Skip to content

Instantly share code, notes, and snippets.

@bennykay
Forked from oraculix/screen.md
Last active September 9, 2021 17:41
Show Gist options
  • Save bennykay/8fb67d6053570486e7e06f227d7b91fb to your computer and use it in GitHub Desktop.
Save bennykay/8fb67d6053570486e7e06f227d7b91fb to your computer and use it in GitHub Desktop.
GNU Screen Cheat Sheet

GNU Screen Cheat Sheet

Basics

Hotkey                                Description
Ctrl-a c create new window
Ctrl-a A set window name
Ctrl-a w show all windows
Ctrl-a 1|2|3 switch to window n
Ctrl-a " choose window
Ctrl-a Ctrl-a switch between windows
Ctrl-a d detach window
Ctrl-a ? help
Ctrl-a [ start copy, move cur­sor to the copy location, press ENTER, select the chars, press ENTER to copy the selected characters to the buffer
Ctrl-a ] paste from buffer

Starting screen

Command                               Description
screen -S <name> Start a new named session
screen -r <name> Attach to a named session
screen -ls list all running screens
screen -DR list of detached screens
screen -dRR The ultimate attach: Attaches to a screen session. If the session is attached elsewhere, detaches that other display. If no session exists, creates one. If multiple sessions exist, uses the first one.
screen -dmS MySession start a detached screen session

Advanced

Hotkey                                Description
Ctrl-a S create split screen
Ctrl-a TAB switch between split screens
Ctrl-a Q Kill all regions but the current one.
Ctrl-a X remove active window from split screen
Ctrl-a O logout active window (disable output)
Ctrl-a I login active window (enable output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment