Screen Command Sequences

There are many screen commands which you can run. To enter a screen command you use the escape sequence following by the command. For a full list of all of the available commands, run man screen. The following table shows some of the commands which we find most useful:

Ctrl-a a	Passes a Ctrl-a through to the terminal session running within screen.
Ctrl-a d	Detaches from a screen session.
Ctrl-a f	Toggle flow control mode (enable/disable Ctrl-Q and Ctrl-S pass through).
Ctrl-a k	Detaches from and kills (terminates) the screen session.
Ctrl-a q	Passes a Ctrl-q through to the terminal session running within screen (or use Ctrl-a f to toggle whether screen captures flow control characters).
Ctrl-a s	Passes a Ctrl-s through to the terminal session running within screen (or use Ctrl-a f to toggle whether screen captures flow control characters).
Ctrl-a :kill	Also detaches from and kills (terminates) the screen session.
Ctrl-a :multiuser on	Make the screen session a multi-user session (so other users can attach).
Ctrl-a :acladd USER	Allow the user specified (USER) to connect to a multi-user screen session.

Setting Up A Shared Screen

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

Sharing A Screen Session With One Account

If you have two people logged into the same account from remote locations, they can easily share a screen session (so what one types the other sees and vice versa). To do this:

Create a named screen session:

[devel@rice ~]$ screen -d -m -S dbgwindow

Attach to the screen session in your terminal window

[devel@rice ~]$ screen -x dbgwindow

Have the other person (logged into the same account) also attach to the screen session

[devel@rice ~]$ screen -x dbgwindow

At this point both terminal windows should see the same thing.