| To start a new screen session, just enter screen. Then start
what ever processes you want. To detach a screen session, type "^a
d" (that's "control-a" followed by a "d" for detach). The
session will then be put into the background. To reattach a session, type screen
-a. It's kind of hard to demonstrate this in written form, but I suggest you give
it a try. Remember to read the man pages for screen!
Also, you can create a screen session by typing something like this:
screen -S top10 top 10
and it will give you a screen session running the top 10 command.
And you can reattach to a session by typing screen -r which will give you a
list of the screen sessions:
[dan@ns:/usr/home/dan] $ screen -r
There are several screens on:
12551.top5 (Detached)
12554.top10 (Detached)
12476.top1 (Remote or dead)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.
In the above, if you want to go back to the screen we started above, you would type:
screen -r top10
See man screen for more details. |