Skip to content

Instantly share code, notes, and snippets.

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

GNU Screen Cheat Sheet

Basics

Hotkey Description
ctrl-a c cre­ate new win­dow
ctrl-a A set win­dow name
ctrl-a w show all win­dows
ctrl-a <n> switch to win­dow n
ctrl-a " choose win­dow
ctrl-a ctrl-a switch between win­dows
ctrl-a d detach win­dow
ctrl-a ? help
ctrl-a [ start copy, move cur­sor to the copy loca­tion, press ENTER, select the chars, press ENTER to copy the selected char­ac­ters 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 ses­sion. If the ses­sion is attached else­where, de­taches that other dis­play. If no ses­sion exists, cre­ates one. If mul­tiple ses­sions exist, uses the first one.
screen -dmS MySes­sion start a detached screen ses­sion

Advanced

Hotkey Description
ctrl-a S cre­ate split screen
ctrl-a TAB switch between split screens
ctrl-a Q Kill all regions but the cur­rent one.
ctrl-a X remove active win­dow from split screen
ctrl-a O logout active win­dow (dis­able out­put)
ctrl-a I login active win­dow (enable output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment