< Linux Guide < Tools

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

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.