Screen cheat sheet
Have you ever experienced a problem where your remote shell session got killed (for various reasons) in the middle of your crucial software compilations? Well it has happened to me several times ranging from getting killed in the middle of php compilations, easyapache, kernel
, to a new cPanel installation 8O. Most of the time, it was due to bad internet connection. To combat with this, a friend suggested me a solution: to use Screen.
What is Screen?
Screen is a free Unix software. Under Screen, if your shell session gets disconnected, the screen session doesn’t go away. It will continue the compilations until completion. Sounds good
How to install screen under CentOS?
yum install screen
How to use Screen? Simply type:
screen
then you will be led into a new virtual shell terminal. After that, just work with your commands normally.
If my session got disconnected, how do I resume my Screen session?
screen -r
If I have multiple screen sessions, how do I see them?
screen -list
How to exit Screen?
exit
How do I exit Screen but still leaving my compilations to keep on compiling?
ctrl+a+d
You will then led back to your original shell session. Your screen session will keep on working. To resume, you can use “screen -r”. Pretty useful right?
Related Posts: