Screen cheat sheet

Posted on the November 6th, 2009 under Cheat Sheets, Server Admin Tips by Stephen

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 :oops: , 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 :lol:

 
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?


Share this page:
  • Facebook
  • Twitter
  • StumbleUpon
  • Slashdot
  • Digg
  • del.icio.us
  • Google Bookmarks
  • Live
  • MySpace
  • Technorati
  • LinkedIn
  • Reddit
Related Posts:
  1. RPM cheat sheet
  2. Unix FIND command cheat sheet
  3. Ubuntu LAMP cheat sheet
  4. Iptables cheat sheet
  5. How to Disable Easy Install in VMware Player 3.0

Leave a Comment