Using screen to leave uninterrupted processes

29 Jan 2011

You want to leave a process running (often on a remote computer), and you want the process to keep running even if you close the terminal session (often running on a local computer).

First start a screen session using

user@remote ~$ screen -S [name]

where [name] is any meaningful identifier for you to remember.

Now you can start your processes, and close the terminal window if you want to.

Later, to recover your session use

user@remote ~$ screen -d -r [name]

so that you can get your session back and monitor the processes that you left running.

If you forget the name of your screen session, you can also always type

user@remote ~$ screen -ls

to see a list of all the currently active “screens”.