Essential screen flags and shortcuts

GNU Screen is a nice little program, allowing you to have "terminals" that you can detach in the background, so that you can have long batch jobs started, outputting stuff to the stdout, for example, but still don't be afraid to close down your terminal by accident etc.

Unfortunately screen has, IMO, quite an awkward syntax, but I managed to learn 3 flag combinations, and two keyboard combinations (from inside screen) that seems to be what I need for basic usage of screen:


Start a new named screen session:

screen -dmS ASessionName

List all detached screen sessions:
screen -ls

Re-attach a named screen session:
screen -r ASessionName


Detach the current session in background:

Ctrl + a, Ctrl + d

Close current screen session:
Ctrl + d