Screen command allows many cool things with the terminal such as:

  1. running executables even if terminal connection is lost
  2. screen sharing with remote people / users (screen and screen -x)
  3. splitting of terminal into multiple shells (Ctrl-a S)
  4. its installed on most distros already


Following are some of its options (from cmd line)

screen              ; start an instance
screen -ls          ; list running instances of screen
screen -x           ; attach to an active screen; used for sharing the same shell with another person
screen -r           ; reattach to an already running non-active instance; used if you left some screens and now want to come back to them
screen -r <pid>     ; reattach to a particular running instance (you may accidentally have many)

Following are some of its commands (once running screen)

Ctrl-a c            ; create a new console
Ctrl-a Ctrl-\       ; Kill all windows and exit

Ctrl-a "            ; list existing screens in a menu (can use up/down arrows to select)
Ctrl-a <num>        ; Switch to a screen, where <num> is the number of the screen
Ctrl-a Ctrl-a       ; Switch to prior screen

Ctrl-a S            ; Split screen (regions); do it again to keep splitting
Ctrl-a tab          ; move between splits
Ctrl-a X            ; close a split (region)

Ctrl-a s            ; freeze screen
Ctrl-a q            ; unfreeze

Ctrl-a d            ; detach from screen, but doesnt now close screens

Scrollback Mode

Ctrl-a [            ; enter scroll-back mode
Esc                 ; exits scroll-back mode

C-b                 ; Scrolls a full page up.
C-f                 ; Scrolls the full page down.

j                   ; Move the cursor down by one line
k                   ; Move the cursor up by one line
technology/unix/screen.txt · Last modified: 11.19.2016 09:43 by nyeates1
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki