GNU Screen Cheat Sheet

Posted on January 4th, 2009


Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). Each virtual terminal provides the functions of a DEC VT100 terminal and, in addition, several control functions from the ISO 6429 (ECMA 48, ANSI X3.64) and ISO 2022 stan-dards (e.g. insert/delete line and support for multiple character sets). There is a scrollback history buffer for each virtual terminal and a copy-and-paste mechanism that allows moving text regions between windows. – man screen

Screen is a very useful program the same way any GUI Windows Managers like KDE/Gnome/Fluxbox are for multi-tasking between programs. Here is a quick list of functions and key combination’s.

Starting screen:
screen -e^Ja # This starts screen with escape command as Control-J-j. This is not the default way for screen but Ja is the secondary return key which is one of the few commands rarely used by programs as a shortcut key combination.

We’re going to refer to Control-J-j as C-J-j.


C-J-j-c = makes new windows
C-J-j-" = to come to graphical view of what windows you have
C-J-j-:title title_of_window = change title_of_window to what ever you wish the window to be called on the menu list.
C-J-j-:kill = this will kill frozen windows (this does happen from time to time
C-J-j-d = this detach the session for you to come back to later (for example over SSH on a stable server)
C-J-j-j = this will go to last window you where on
C-J-j-n = this will go to the next window on the list
C-J-j-p = this will go to the previous window on the list

Reattaching screen when detached
screen -x

To List all backgrounded sessions
screen -list

Attaching to a session when there is more than one
screen -x pid

Thanks,
Ash Palmer
Network Security Logistics