Keep ssh session saved (Unix “screen” utility)

Unix screen utility is very useful when you’re managing remote unix server by means of ssh. This utility allows to save session opened and come back to it after being disconnected…
Let me describe the certain situation: you’ve started dump/restore backup operation for full filesystem mirroring to another hard drive remotely by ssh. It works fine and more than 50% is completed but after power outage or your internet supplier issue you’ve been disconnected from ssh session. As the result backup/restore operation is stopped and it’s necessary to start it again.

To prevent this just start ‘screen’ utility and run needed command after this. In case of disconnection you’ll need to type ‘screen -r’ (-r means restore) and come back to operations you were performing before being disconnected.

This utility is rather powerful and besides allows to create several virtual windows and switch between them by means of hot keys.

Here are some of useful hot keys:

CTRL-a c Create a new window
CTRL-a spacebar Go to next window
CTRL-a backspace or del Go to previous window
CTRL-a 2 Go to window 2
CTRL-a w list windows

SHARE:
nv-author-image

Stefan Durand

My name is Stefan, I'm the admin of LinuxScrew. I am a full-time Linux/Unix sysadmin, a hobby Python programmer, and a part-time blogger. I post useful guides, tips, and tutorials on common Linux and Programming issues. Feel free to reach out in the comment section.

4 thoughts on “Keep ssh session saved (Unix “screen” utility)”

  1. The quality of customer service (or lack thereof) this time around is simply appalling. I cannot quantify or put into words the frustration and anger I feel as a result of their poor customer service. This is the most frustrating experience I’ve had outside of dealing with trains in China. I am seriously contemplating never using Amazon again after my Prime membership expires. It is really not worth this headache when I attempt to get some sort of recourse as a consumer. I don’t understand how you expect to keep customers with such poor customer service.

  2. Great article Dan! I would like to mention though, that by using SugarSync to back up your data, you grant them a worldwide, non-exclusive, perpetual, royalty-free license of your files.

Leave a Reply

Your email address will not be published. Required fields are marked *