Friday, July 26, 2013

Using the Linux screen command to detach processes from terminal

A nice simple example based page on how to use the screen command in Linux.

http://www.thegeekstuff.com/2010/07/screen-command-examples/

Allows you to detach and later re-attach to SSH sessions without killing your processes.

Start screen session.
$ screen ./work_on_something.sh
Press CTRL+A and then "d" to detach.

List screen sessions.
$ screen -ls
There is a screen on:
21952.pts-0.debian-7 (07/26/13 23:25:29) (Attached)
1 Socket in /var/run/screen/S-user.

If detached, attach with -r
$ screen -r 21952.pts-0.debian-7

No comments:

Post a Comment