Administration

Using screen

Login via ssh and type:

# screen

Now you can perform whatever the action is. In this example, I am running top just for the example.

Then type top:

#top
top - 20:22:27 up 10 days,  3:47,  1 user,  load average: 0.01, 0.04, 0.00
Tasks: 171 total,   1 running, 170 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.1%us,  0.1%sy,  0.0%ni, 99.8%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   7971616k total,  5512200k used,  2459416k free,   201416k buffers
Swap:  4184928k total,        0k used,  4184928k free,  3597836k cached

Detach the screen out by pressing:

# ctrl+a+d

Now you can logout of the ssh session.

Now, other party logs in via and types this to resume the screen:

# screen -r

And see’s top…

top - 20:22:27 up 10 days,  3:47,  1 user,  load average: 0.01, 0.04, 0.00
Tasks: 171 total,   1 running, 170 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.1%us,  0.1%sy,  0.0%ni, 99.8%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   7971616k total,  5512200k used,  2459416k free,   201416k buffers
Swap:  4184928k total,        0k used,  4184928k free,  3597836k cached

Kill a screen:

# screen -ls
# exit