Skip to main content

The 'screen' program

screen can be used when running jobs to allow you to disconnect your computer from a remote terminal session, for example when running a very long rsync job. 

 

# (From a terminal command line):
# create a new screen session
screen -S    #name the session

# from within a screen session
ctrl-a d   # detatch from session (hit 'ctrl-a' at the same time, then hit  the d key)
exit       # quits and exits a screen session

# look for running screen sessions
screen -ls
screen -r    #attach to named session

# other commands
attach to a running session     screen -x
the “ultimate attach”     screen -dRR (Attaches to a screen session. If the session is attached elsewhere, detaches that other display. If no session exists, creates one. If multiple sessions exist, uses the first one.) 

See Also: http://aperiodic.net/screen/quick_reference