GNU screen cheatsheet

Quick reference to GNU screen essential bindings

2 minute read

GNU screen is a terminal multiplexer that allows for different virtual windows and panes running different processes within the same terminal session, being it local or remote. This post contains a quick reference to the most used default key bindings of GNU screen. In contrast to other terminal multiplexers like tmux, GNU screen is probably already installed in your server of choice.


Command Action
screen -S <session-name> create new session with name
screen -r or screen -x attach to most recent session
screen -r <session-name> attach to named session
screen -ls list running sessions


Keys Action
ctrl + a escape key (used to access all other key bindings)
ctrl + a d detach and go back to original terminal session
ctrl + a D D detach and log out
ctrl + a \ exit all programs in screen
ctrl + a ctrl + \ force exit (not recommended)
ctrl + a :quit close session and quit screen
ctrl + a ? help

Window management

Keys Action
ctrl + a c create new window
ctrl + a A rename current window
ctrl + a " show window list and choose window
ctrl + a w display window bar
ctrl + a 1,2,… switch to window number
ctrl + a n move to next window
ctrl + a p move to previous window
Close all processes (incl. shell) close window
ctrl + a k force close window


Keys Action
ctrl + a S horizontal split
ctrl + a V or | vertical split
ctrl + a tab jump to next region
ctrl + a X close current region
ctrl + a Q close all regions but current


Keys Action
ctrl + a [ enter copy mode
space toggle selection and copy
ctrl + a ] paste


Finally, I just want to share my .screenrc configuration. It starts with 5 windows by default and adds a window bar at the bottom with the host, the window list and the time so that you never miss your appointments. Find it here.

GNU screen with the configuration above

Website design by myself. See the privacy policy.
All content on this site is licensed under CC-BY-NC-SA 4.0.