Oct 262009
 

Create a screen session

Create a screen with most of the shells capabilities and a unique name.

screen -aS my_screen_name

Detach from the screen session

Now that you are connected, run some commands as you would in a normal console. When you want to leave the session but do not want the screen session or the process that is is running to terminate, hold down Ctrl a and press d. This will detach you from the screen session.
Ctrl a + d
List the screens you have running

screen -list

The output will look something like this.

screen -list
There is a screen on:
2198.my_screen_name (Detached)
1 Socket in /var/run/screen/S-root.

Reattach to the running screen process

screen -r my_screen_name

Terminate a screen session

Attach to the session and exit.

screen -r my_screen_name
exit

Force detach an existing user and reattach as root

screen -DR

You can always kill the PID of the screen session for a down and dirty exit.

 Posted by at 3:41 am

 Leave a Reply