Using screen¶
-
Start a Screen session
Simply type
screen
and press Enter. This will start a new session.To create a named session instead, use
screen -S mysession
. -
Detach from a session
Press
Ctrl-A
followed byD
. The session will continue running in the background. -
List active sessions
Run
screen -ls
-
Re-attach to a session
-
Use
screen -r
to attach to resume the last session. -
Use
screen -r mysession
to attach to a named session. -
If you got kicked out of the system, the session may still be attached. Use
screen -D -r mysession
to force-detach, then re-attach to the session. (No name is needed if there is only one session.)
-