Difference between revisions of "Screen - Virtual Terminals From Console"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
Line 36: Line 36:
 
<big>'''Basic Screen Commands'''</big>
 
<big>'''Basic Screen Commands'''</big>
  
CTRL-A +
+
'''CTRL-A''' +
::: N   next console
+
::: '''N''' &nbsp; next console
::: P   previous console
+
::: '''P''' &nbsp; previous console
::: M   monitor
+
::: '''M''' &nbsp; monitor for activity
 +
::: '''_''' &nbsp; monitor for inactivity (default 30 sec)
 +
::: '''"''' &nbsp; list of open screen consoles, use the '''J''' and '''K''' keys to navigate
 +
::: '''Shft A''' &nbsp; manually set screen names (label them)
 +
::: '''K''' &nbsp; kill a screen virtual console
 +
::: '''\''' &nbsp; kill all screen virtual consoles
  
  

Revision as of 00:10, 25 January 2008

screen

screen [options] [command [args] ] 

In their words: Provide ANSI/VT100 terminal emulation, making it possible to run multiple full-screen pseudo-terminals from one real terminal, and letting you manipulate and save your screen input and output, copy and paste between windows, etc.

In other words: multiple virtual terminals from one terminal (like a remote shell), with the ability to detach processes and leave them running even when you disconnect!

  • Do more from one terminal connection
  • Leave stuff running even if you detach or disconnect
  • Handy for unreliable terminal connections
  • Scroll back and see what you missed

Screen offers the ability to detach from a session and then attach to it at a later time. When detached from a session, the processes screen is managing continue to run. You can then re-attach to the session at a later time, and your terminals are still there, the way you left them.

Screen also maintains individual, searchable scrollback buffers for each of the windows it manages. Screen sends all entered text to the current window, with the exception of the command character. The default command character is Ctrl-A. .screenrc is the per-user configuration file in your home directory, and /etc/screenrc is the system-wide configuration file that applies to all users.

Screen sets TERM to screen—each screen window provides its own vt100-compatible virtual terminal. The variable WINDOW is set to the virtual window number, and the variable STY is set to your session name.

Using Screen Walk Through

1. Telnet or SSH into a remote Linux system with screen installed.

2. Type 'screen' in the shell and press enter.

3. CTRL-A + C will open a new screen virtual console.

Say you had 'top' running in the first console, you can press CTRL-A and top will remain running in console 1, it will not be a stopped job, nor will it be 'background' it will in fact remain a fully interactive running process. It is just like you opened a second connection with the remote system.

4. CTRL-A + P will return you to the previous virtual console which is running the top command.

5. CTRL-A + N will put you into the second virtual console

P for previous, N for next.

Basic Screen Commands

CTRL-A +

N   next console
P   previous console
M   monitor for activity
_   monitor for inactivity (default 30 sec)
"   list of open screen consoles, use the J and K keys to navigate
Shft A   manually set screen names (label them)
K   kill a screen virtual console
\   kill all screen virtual consoles