411 REFERENCE · Wikibooks
Linux Guide/Tools/Screen
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Screen is a very powerful program that allows multiplexing several interactive shells. The sessions can be attached and detached, this is especially useful for sessions that are used on a remote sever: One can log on from a different computer, attach the screen session and continue working in the same environment which was last encountered.
Most important commands
Starting a screen session:
screen -S sessionname
Attaching an already running screen session:
screen -r sessionname
list all running screen sessions
screen -ls
From inside a screen session, all commands are started with Ctrl-a and then another key.
Detach session: Ctrl-a + d
Switch to next window: Ctrl-a n
Switch to previous window: Ctrl-a p