Skip to Content

Using Screen

Pronco's picture

Ever happened to you while working on a compile or any other operation through ssh and just before the end you get disconnected and lose all the work in that session, how frustrating . . .

Well no more tears ! screen is here

Screen is simply a command that gives several virtual terminal from one ssh session and they don't expire with ssh

After you start your ssh session just type screen and start working and if the connection is diconected when you log back in just type screen -ls to list the screen sessions available, output as follows

There is a screen on: 10244.pts-0.ramezhanna (Attached)

then you type:

One last trick, if you want to logoff while the command executes you can detach screen using the CTRL-A + d key combination which gets you out of the screen session while it is still running then you can log out of the ssh session and then log back in and resume the screen session when appropriate, when you want to end the screen session just type exit in that session

READ THE DAMN MAN PAGES :)

Cheers..



Dr. Radut | book