Newest Downloads

Feb.01

python queryns.py -husage: queryns.py [options] arg --username=username --password=password --net...

Nov.02

This Expect script takes as it's argument, the IP Address of an IOS device that is using AAA Aut...

Screen HowTo Part 1
Linux HowTo's - Advance Linux HowTo's
Written by Allen Sanabria   
Sunday, 11 May 2008 17:46

I've been using screen for the past 3 years and for the first time I've decided to seek out more functionality out of it.  So last week I spent about 2 hours looking up some of the different functionality that I can use in the day to day. Let me tell you I found a bunch of goodies that I use now religiously (For a week now ;) ).

So for those of you who do not know what a screen session is... (STRAIGHT FROM THE MAN PAGES) Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells).  Essentially you can have 30 terminal sessions inside one terminal and much more.....

 

 

To run Screen all you need to do is type "screen" in your terminal. You more then likely do not have it installed by default. So for those of you who have the distributions below... 

  1. Fedora/CentOS/RHE/ or any RedHat based system, you will need to run "yum install screen"
  2. Ubuntu/Debian based systems, you will need to run "apt-get install screen"
  3. Gentoo based systems, you will need to run "emerge screen"

 

To start a new screen session all you have to do is type "screen"
Now that you are in a screen session, the fun begins now...


 

 

1- To start a new sub session (Virtual Session) type
   ((ctrl+a) c)
   Please ignore the plus (+)symbol, this essentially means "ctrl a then c"

2- To switch between sessions...
   ((ctrl+a) <space bar>)

3- To switch between your previous session and the current one..
   ((ctrl+a) a)

4- To kill a frozen session...
   ((ctrl+a) k)

5- To see a list of available commands...
   ((ctrl+a) ?)

6- To see a list of virtual terminals you have open..
   ((ctrl+a) ")

7- To Detach from a screen session and not lose any of your virtual terminals...
   ((ctrl+a) d) ( This is one of the best features of screen!! )

8- To view  current screen sessions once you are logged out of screen..
   "screen -list"

9- To reattach to an Attached session (Session that was not detached properly)
   "screen -D -r <11546.pts-5.hostname>" (session name from the output of the screen -list command)

10- To reattach to a detached session..
   "screen -r <11546.pts-5.hostname>" (session name from the output of the screen -list command)

10- To end that session you can either type
  "exit" or a (ctrl+d)

The above commands are the most BASIC/COMMON for screen and its everyday use.

Now time for a little more advance functionality.. Off to Part 2 of this HowTo



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Free Joomla PHP extensions, software, information and tutorials.
Comments
Search RSS
dynasty   |SAdministrator |2008-05-16 02:42:02
I will be posting the Second half of this tutorial today which will focus on
screenrc and some other not so used but helpful commands for screen
Only registered users can write comments!

3.22 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated on Saturday, 24 May 2008 13:30