Linux screen command

screen [-AmRvx -ls -wipe][-d <job name>][-h <number of lines>][-r <job name>][-s ][-S <job name>]

Parameter Description

-A Resize all windows to the current terminal size.
-d <job name> Take the specified screen job offline.
-h <number of lines> Specifies the number of lines in the viewport's buffer.
-m Forces the creation of a new screen job even if the screen job is currently in the job.
-r <job name> Resume offline screen jobs.
-R Attempts to resume offline jobs first. If no offline job is found, a new screen job is created.
-s Specifies the shell to be executed when creating a new window.
-S <job name> Specifies the name of the screen job.
-v Display version information.
-x Resume previously offline screen jobs.
-ls or --list Display all current screen jobs.
-wipe Checks all current screen jobs and deletes screen jobs that are no longer available.

 Common parameters

screen -S yourname -> create a new session called yourname
screen -ls (or screen -list) -> list all current sessions
screen -r yourname -> return to the session of yourname
screen -d yourname -> detach a remote session
screen -d -r yourname -> end the current session and return to the session of yourname

hot key

Ctrl+a c     new window     

Ctrl+a n     next window     I bind F12 to this     

Ctrl+a p     previous window     I bind F11 to this     

Ctrl+a “     select window from list     I have window list in the status line     

Ctrl+a Ctrl+a     previous window viewed  

Ca 0..9 switch to window 0..9     

Ca a Send Ca to the current window

Ca k kills the current window

Ctrl+a S     split terminal horizontally into regions     Ctrl+a c to create new window there     

Ctrl+a |     split terminal vertically into regions     Requires debian/ubuntu patched screen 4.0     

Ctrl+a :resize     resize region     

Ctrl+a :fit     fit screen size to new terminal size     Ctrl+a F is the same. Do after resizing xterm     

Ctrl+a :remove     remove region     Ctrl+a X is the same     

Ctrl+a tab     Move to next region     

Ctrl+a d     detach screen from terminal     Start screen with -r option to reattach     

Ctrl+a A     set window title     

Ca ? Display all key binding information     

Ca w Displays a list of all windows

Ctrl+a x     lock session     Enter user password to unlock     

Ctrl+a [     enter scrollback/copy mode     Enter to start and end copy region. Ctrl+a ] to leave this mode     

Ctrl+a ]     paste buffer     Supports pasting between windows     

Ctrl+a >     write paste buffer to file     useful for copying between screens     

Ctrl+a <     read paste buffer from file     useful for pasting between screens     

Ctrl+a ?     show key bindings/command names     Note unbound commands only in man page     

Ctrl+a :     goto screen command prompt     up shows last command entered    

Ctrl+a then shift+s to split the screen up and down, switch to the bottom Ctrl+a tab and create a new window (Ctrl+ac)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324934511&siteId=291194637