Table of Contents

PC Software

Screen

Basic Information


Configuration

~/.screenrc


Commands

Booting screen

Command Explanation Complement
screen -ls
screen -w
Do not start screen, but instead print a list of session identification strings. list
screen -r
screen -r PID
screen -r NAME
Resume a detached screen session. resume
screen -wipe deleting 'Dead screens' Process
List available screens like screen -ls, but remove destroyed sessions instead of marking them as ‘dead’.
screen -d PID Detach the PID
detaches the elsewhere running screen session.
screen -c file override the default configuration file

Example

[user01@ladder-1 ~]$ screen -ls
There are screens on:
5076.pts-73.ladder-1 (Attached)
5443.pts-26.ladder-1 (Detached)
10025.pts-1.ladder-1 (Detached)
3 Sockets in /var/run/screen/S-user01.

[user01@ladder-1 ~]$
[user01@ladder-1 ~]$ screen -r 10025
or
[user01@ladder-1 ~]$screen -r 10025.pts-1.ladder-1

inter screen

Key Explanation Complement
C-a ? help
C-a i Show info about the current window. info
C-a d Detach screen from this terminal. detach

Operating Window

Key Explanation Complement
C-a c Create a new window create
C-a k Destroy the current window. kill
C-a “ Present a list of all windows for selection.
C-a 0
C-a 1
Switch to window number 0, 1.
C-a n
C-a Space
Switch to the next window. next
C-a p
C-a h
C-a Backspace
Switch to the previous window prev
C-a w Show a list of active windows.
C-a C-a Toggle to the window displayed previously.

Splitting Window

Key Explanation Complement
C-a S Split the current region into two new ones. split
C-a Tab Switch the input focus to the next region.
C-a Q Delete all regions but the current one.
C-a X Kill the current region.
:resize +1
:resize -1

Copy mode

Key Explanation Complement
C-a [
C-a Esc
Enter copy/scrollback mode.
C-a ] Write the contents of the paste buffer to the stdin queue of the current window.


Case

Cannot open your terminal '/dev/pts/N' - please check.

$ whoami
user01
$ su - user02
$ screen
Cannot open your terminal '/dev/pts/4' - please check.       <- /dev/pts/4's owner is user01
$ tty
/dev/pts/4
$
$ script /dev/null
$ tty
/dev/pts/5
$ sreeen