[PLUG] A Simple Question [screen utility]

Cory Bertsch cory at trilocal.com
Sun Aug 17 15:09:01 UTC 2003


Has anyone here used 'screen'? It works similarly to the "prog &"
command but it more powerful. I'm not sure where you can download it
from, but it comes in apt-get for Redhat, so I think it's a pretty
common utility.

Here is how it works.

1. login to machine with a terminal or ssh, etc.
2. type screen, then do whatever command(s) you want to

3. login from another terminal
4. type screen -d   (detach screen)
This will cause your first terminal session to be saved and continue
running in the background. You can not logout of your first (and second)
terminal and your commands from step 2 will continue to run in the
background.

5. When you want to resume your session from step #2, login to your
machine again and type screen -r. This will cause you to jump back into
your screen from step 2 as if you hadn't even left the session.

Notes: You can detach multiple screens. If you do so the "screen -r"
command will list the sessions and allow you to pick the screen session
you wish to resume.

I use screen to detach things that are more complicated than typing
something like 'grekllm &'. It works really well if you are compiling a
program on a remote computer and don't want to have to keep your
terminal open until the compile is done. I use it with Gentoo when I do
something like "emerge prog1 prog2 prog3" all the time.

-Cory







More information about the PLUG mailing list