Screen
I am using Linux for several years, but just started with Screen. From my personal view, this is a magical tool to:
- use your Linux from remote shell and like using more than one shell;
- using unstable network connection and ssh link randomly closes;
- leave running processes after your connection is closed;
It is a good chance to have Screen in your Linux distribution’s package library so installation is quite simple like:
To start it just type:
Or if you want multiple session you can name your current one:
When screen started, you can do all your work as you are in the normal shell environment. But since the screen is an application, so it have command or parameters. With Control-a ?
key combination the help screen is appeared.
If your connection had broken, but you can reconnect to get your previous session type:
Here is the list of the most commonly used commands and a simple startup file:
Control-a ?
: displays the list of the commandsControl-a c
: creates a new interactive shellControl-a number
: switches between shells, number should be 1,2,3..Control-a Shift-a
: renames a shellControl-a "
: lists all the shellControl-a p
: switches to the previous shellControl-a n
: switches to the next shellControl-a d
: detaches the screen consolescreen -r
: restores the screenControl-a w
display the screen list in the status bar
Put the content of this file into your ~/.screenrc: