Screen

The screen application is very useful, if you are dealing with multiple programs from the command line. One of the most useful features of screen is that is also allows you to “detach” & “re-attach” terminal sessions, (and share your sessions with others users). ‘Detaching’ allows our programs within a screen instance to continue to run, but returns the terminal to the initial ssh session (that screen was started in). The screen session is still there, it will just be managed in the background.

This is useful if you are on a flaky connection (that might drop out for example) or you want to start something in a terminal session and log off you ssh session (without killing the process), and log in later to check on the process (potentially from a different computer, e.g. home).

To start a new screen session:

screen

 
To detach a screen, type <CTR>-A and d. This will

To re-attach an exiting screen:

screen -r

 
If there a multiple existing screens, you must also choose the specific screen session you would like to re-attach.