GNU screen is a very handy terminal multiplexer available on Linux platform.
Instead of having multiple shells open on a server, this tool allows you to have multiple instance of a terminal with only one open connection.
This feature is interesting for its commodity, but certainly the biggest advantage is the flexibility provided here: a virtual terminal can be detached and reattached. This feature let the terminal open a run in “background”. You can close the connection, and as long as screen is still running, you work or current launched processes from the screens are still executing. Once you reconnect to the server you can retrieve all your work.
root@mc:/# apt-cache search screen | grep ^screen | head -n1 screen - terminal multiplexer with VT100/ANSI terminal emulation root@mc:/#apt-get install screen
Once installed you can simply run it with the command “screen”:
Here are some useful shortcuts to get your way around easily:
- screen : start screen - screen -S : start screen naming the instance - Ctrl-a d : detach the current session - screen -d : detach the specific session - Ctrl-a c : create a new screen - Ctrl-a n : navigate to next screen - Ctrl-a p : navigate to previous screen - Ctrl-a w : show bar at the bottom with the s - Ctrl-a k : kill a window - Ctrl-a A : rename current windows - screen -ls : lists all running windows - Ctrl-a ? : get help
Note that you can use screen to split your shell display.