screen
Features of screen:
- it keeps text-based programs which need interaction with their user running, even when the connection between your client machine and the server you are working on dies for unkown reasons (e.g., if your windows machine suddenly dies)
Elementary usage guidelines:
- # start the screen to make sure you can safely lose your connection while working:
screen
- # open whatever interactive program you like, e.g., an editor or your favourite email program such as pine in the current screen session:
joe /tmp/whatever
- # open another shell window in that same screen session by pressing
ctrl-a c
- # read the man page for screen in this new session:
man screen
- # go back to your editor window:
ctrl-a 0
- # create a third shell window:
ctrl-a c
- # you can go to the next screen with
ctrl-a n
- # you can go to the previous screen with
ctrl-a p
- # you can now detach your screen session in case you wish to do something else:
ctrl-a d
- # once the screen session has been detached, you can also re-attach it:
screen -r
- # if you have a screen session which is active on a remote machine, you can remotely detach it:
screen -d
- # I commonly use the following commands to detach an existing screen session and to re-attach it immediately:
screen -d;screen -r