Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save tekgnosis-net/75e00d2c3c3e511f570bb7800f24d3cb to your computer and use it in GitHub Desktop.

Select an option

Save tekgnosis-net/75e00d2c3c3e511f570bb7800f24d3cb to your computer and use it in GitHub Desktop.
Screen Cheatsheet

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r <session_name>
Detach a running session screen -d <session_name>

Escape Key

All screen commands are prefixed by an escape key, by default Ctrl-a (that's Control-a, sometimes written ^a). To send a literal Ctrl-a to the programs in screen, use Ctrl-a a. This is useful when when working with screen within screen. For example Ctrl-a a n will move screen to a new window on the screen within screen.

Getting Out

Description Command
detach Ctrl-a d
detach and logout (quick exit) Ctrl-a D D
exit screen Ctrl-a : quit or exit all of the programs in screen.
force-exit screen Ctrl-a C-\ (not recommended)

Help

Description Command
See help Ctrl-a ? (Lists keybindings)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment