Screen
screen(1) is terminal multiplexer.
Contents
Installation
Most Linux and BSD distributions will offer a screen package.
Usage
Running without any arguments starts a session. A name for the session can be provided like:
screen -S session_name
To list the running sessions, try:
screen -list
To attach to a session, try:
screen -r session_name
Within a session, commands can be dispatched to the multiplexer with the Ctrl+A 'escape key'. Some important commands:
Ctrl+A + ? shows help information
Ctrl+A + d detaches from the session
Ctrl+A + X closes the region
Ctrl+A + : provides a prompt for text commands, like quit which closes the session
To submit a command to the multiplexer to be executed in a session, use the -X flag. As an example, to close a session without attaching it, try:
screen -X -S session_name quit