Sometime you nee to run a script or something like that on a remote host and you can’t be sure, that the remote session will preserve until the script has finished. Another case is mobile working. Sometimes you need the possibility to start a script on one place, send your disconnect the ssh client and open another one somewhere else. That’s all possible with screen:
Open screen session
$> screen -S SUPERSESSIONNAME
Jump back to main session
With the following shortcut you can detach the current screen session so that you can reattach it later:
ctrl+a and then d
List all open sessions
$> screen -ls
Reattach a closed session
$> screen -r [SID]
Destroy
To kill a screen that you’ll never need again, do this in the already attached screen:
$> exit
More Information
-
Installation and usage:Â http://www.rackaid.com/resources/linux-screen-tutorial-and-how-to/