Kudithipudi.Org

May 30, 2012

HOW TO : Use screen to multitask

Filed under: HOWTO,Linux,Technology — Vinay @ 3:36 pm

Want your terminal to look like this? 

In addition to the coolness, factor it also helps you do (monitor) multiple things at  a time. In this screenshot

  • I am checking the resource utilization on my web server
  • Tailing the web server logs to look for errors
  • have a small console for me to run any commands

You can achieve this by using the nifty screen utility. Screen allows you to multiplex between multiple consoles.  So you can open one terminal and have multiple consoles on it. The commands for using screen are a bit hard to get used to. Here are the shortcuts I used to achieve the screen above

  1. Install the screen package
  2. Create a new screen session by running
     screen 
  3. Add a new screen console by executing
     ctrl + a 
    c
  4. Split the screen by executing
    ctrl + a 
     Shift + s 
  5. Name the different consoled by executing
    ctrl + a
    Shift + a

As you might have figured out by now, “ctrl + a” puts you into screen command mode. You can get a list of all available options by executing

ctrl +a

 

?

Here’s a quick reference guide that has more details http://aperiodic.net/screen/quick_reference 

Have fun multitasking :)

2 Comments »

  1. I started using ‘Screen’ in my present company. It is indeed cool ! It can be used for Process monitoring as well, where you can attach and detach running jobs on the server.

    Comment by Ashok — June 4, 2012 @ 2:22 am

  2. That’s right.. I think the usage scenarios are limitless :)

    Comment by Vinay — June 4, 2012 @ 8:57 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress