HowTo Share A Terminal Session Using Screen

From NST Wiki
Revision as of 12:57, 4 September 2011 by Paul Blankenbaker (talk | contribs) (Created page with 'The '''screen''' command can be particularly useful in the following circumstances: * When you want to leave a terminal session running even after logging out of the system. * W…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The screen command can be particularly useful in the following circumstances:

  • When you want to leave a terminal session running even after logging out of the system.
  • When you want to share a terminal session with another user (sort of like VNC but for the terminal).

Setting Up A Shared Screen

The following command sequence sets up a shared screen session named shared:

[pkb@rice ~]$ screen -d -m -S shared
[pkb@rice ~]$

Listing Your Screen Sessions

The following shows what screen sessions you currently have running:

[pkb@rice ~]$ screen -ls
There is a screen on:
	8632.shared	(Detached)
1 Socket in /var/run/screen/S-pkb.

[pkb@rice ~]$ 

Attaching To A Existing Screen

The following allows you to attach to a existing screen session named shared:

[pkb@rice ~]$ screen -r shared

Once attached, all of your commands will be done within the screen named shared. To detach yourself from the screen, use the Ctrl-a d command sequence.