Posts Tagged ‘screen’

screen :- tool for sysadmin

Sunday, July 25th, 2010

When you have to do ssh and work, try to give “screen” command . It will save you

Some screen  commands to remember

  • screen -ls will list the current screen sessions running on a machine.
  • Control+a (press Control and then press a) Will toggle between your current shell and your previous shell
  • Control+a d will detach you from a session.

Basics of how to use screen on a Linux/Ubuntu machine

Create a session :-
screen -S sessionname
Here I am giving  “screen -S nuxeo” //I am working on nuxeo , so I named it

We can have up to 10 interactive shells open in one window.When we start a new session we are in shell 0.
To create more shells,Press cntrl key, then press and release  the “a” key and type letter “c”

switching between shells
press ctrl, then press and relase “a”  key and then press the shell no

GNU Screen allows you to manage several interactive shell instances within the same “window.” By using different keyboard shortcuts, you are able to shuffle through the shell instances, access any of them directly, create new ones, kill old ones, attach and detach existing ones.

Instead of opening up several terminal instances on your desktop or using those ugly GNOME/KDE-based tabs, Screen can do it better and simpler.

Not only that, with GNU Screen, you can share sessions with others and detach/attach terminal sessions. It is a great tool for people who have to share working environments between work and home.