screen Cheat Sheet

A Software › Screen cheat sheet in English by gissehel

screen commands survival guide. Sorted by usefulness.

67,883 views 14,567 downloads 11 Dec 2011 History
5.0 avg · 15 ratings

Enter / Quit

screen -S foo
create a screen named "­foo­"
screen -x foo
attach to an existing screen named "­foo­"
[^A] [d] or [^A] [^D]
detach current screen
exit or [^D] (in screen shell)
exit the shell starting the screen thus exit the screen
exit or [^D] are not screen commands but bash ones

Syntax convention

^
[Control] key
[^A]
[Control] + [a]
[a]
[a]
[A]
[Shift] + [a]
[^A][A]
[Control] + [a] then [Shift] + [a]
[^A][A]
different from [^A][a]

Window (screen tabs)

[^A] [c]
Create a new window
exit or [^D] (in screen shell)
exit the current shell created by the window, thus exit the window
[^A] [0]
Go to window 0
[^A] [3]
Go to window 3
[^A] [n]
Go to next window
[^A] [p]
Go to previous window
exit or [^D] are not screen commands but bash ones

Disclaimer

This cheat only describe the default key bindings
key bindings can be modified by editing ~/.scr­eenrc or another screenrc file

Split screen

[^A] [S]
Split screen horizo­ntally
[^A] [|]
Split screen vertically
[^A] [^I] or [^A] [Tab]
Change splitted part
[^A] [Q]
Remove all splitted parts

Misc

[^A] [A]
Rename current window
[^A] [k]
Kill current window
[^A] [^A]
Switch to last used window
[^A] [a]
Send [^A] to current screen

Badges

Useful Cheat Sheet Great Cheat Sheet Nice Cheat Sheet Good Cheat Sheet Appreciated Cheat Sheet Downloaded from Unusual Locations × 4

Comments (7)

SencerH 09:28 26 Jun 2018

There should be scroll buffer shortcut. Would you please add ^A + Esc combination and how to use this mode?

Reply
Kakolukia 08:40 7 Feb 2014

Would you mind adding the Enter/Quit commands from https://library.linode.com/linux-tools/utilities/screen#sph_managing-screen-attachment ?

Reply
gissehel 21:46 4 Jan 2012

@RicoPags : What should also be documented : While [^A] mean [Ctrl+a] in screen help, [^A] [A] doesn't mean [Ctrl+a] [a] but [Ctrl+a] [Shift+a]. It's screen own convention (the one you'll see in [^A] [?]) but it's very misleading.

Reply
gissehel 21:42 4 Jan 2012

@Ian : In fact ^A (in screen dialect) is not [Esc] but it's what emacs calls [C-a] or what windows calls [Ctrl+a]. which is obtained by pressing [Ctrl] then pressing [A] then releasing [A] then releasing [Ctrl]. It's true that it should be documented (even it's a classical unix representation of shotcuts, you can find it for example in pine or mutt interface).

Reply
RicoPags 21:12 4 Jan 2012

For me, ^a,s and ^a,q are the equivalent of bash ^s and ^q [freeze/unfreeze terminal]

Reply
RicoPags 21:13 4 Jan 2012

I see holding shift makes a difference and does split screens. That's great information, perhaps it would be best to add the lowercase so nobody is confused?

Reply
Ian 13:32 30 Dec 2011

This cheatsheet should mention that [^A] is actually just the escape key, which by default is ^A but can be something else. For example, Ubuntu's screen wrapper byobu also uses F12 depending on your keybindings.

Reply

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.