Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
quick_reference [2016-09-14 23:29]
76.21.80.77
quick_reference [2018-11-14 10:15]
213.164.94.170 deleted 'test' in title
Line 1: Line 1:
-====== screen Quick Reference ====== +====== SCREEN Quick Reference ======
-How to Navigate, copy & paste content?+
  
-within screen sessions: +===== Getting in ====
-Cntl a + [  : To start navigation using up/down arrow +
-Press Space bar: To select content starting position +
-Press Space bar again: To select a block of content +
-Cntl a + ] : To paste the selected content +
- +
-===== Getting in =====+
  
 | start a new screen session with session name | ''screen -S //<name>//'' | | start a new screen session with session name | ''screen -S //<name>//'' |
 | list running sessions/screens | ''screen -ls'' | | list running sessions/screens | ''screen -ls'' |
 | attach to a running session | ''screen -x'' | | attach to a running session | ''screen -x'' |
-... to session with name | ''screen -r //<name>//'' |+attach to session //name// | ''screen -r //<name>//'' |
 | the "ultimate attach" | ''screen -dRR'' (Attaches to a screen session.  If the session is attached elsewhere, detaches that other display.  If no session exists, creates one.  If multiple sessions exist, uses the first one.) | | the "ultimate attach" | ''screen -dRR'' (Attaches to a screen session.  If the session is attached elsewhere, detaches that other display.  If no session exists, creates one.  If multiple sessions exist, uses the first one.) |
- 
-| detach a running session | ''screen -d //<name>//'' | 
  
 ===== Escape key ===== ===== Escape key =====
  
-All screen commands are prefixed by an escape key, by default ''C-t'' +All screen commands are prefixed by an escape key, by default ''C-a'' 
-(that's Control-t, sometimes written ''^a'').  To send a literal ''C-t'' +(that's Control-a, sometimes written ''^a'').  To send a literal ''C-a'' 
-to the programs in screen, use ''C-a''. This is useful when working with screen within screen. For example ''C-a n'' will move screen to a new window on the screen within screen.+to the programs in screen, use ''C-a''. This is useful when working with screen within screen. For example ''C-a n'' will move screen to a new window on the screen within screen.
  
 ===== Getting out ===== ===== Getting out =====
  
-| detach | ''[[commands:detach|C-d]]''+| detach | ''[[commands:detach|C-d]]''
-| detach and logout (quick exit) | ''[[commands:pow_detach|C-D D]]''+| detach and logout (quick exit) | ''[[commands:pow_detach|C-D D]]''
-| exit screen | ''[[commands:quit|C-\]]'' Exit all of the programs in screen. (//not// recommended) |  +| exit screen | ''[[commands:quit|C-\]]'' Exit all of the programs in screen. (//not// recommended) |  
-| force-exit screen | ''[[commands:quit|C-C-\]]'' (//not// recommended) |+| force-exit screen | ''[[commands:quit|C-C-\]]'' (//not// recommended) |
 | getting out of the screen session | exit | | getting out of the screen session | exit |
- 
-===== Help ==== 
- 
-| See help | ''[[commands:help|C-t ?]]'' (lists keybindings) | 
- 
-The [[man:start|man page]] is the complete reference, but it's very long. 
  
 ===== Window Management ===== ===== Window Management =====
  
-| create new window | ''[[commands:screen|C-c]]''+| create new window | ''[[commands:screen|C-c]]''
-| change to last-visited active window | ''[[commands:other|C-C-a]]'' (commonly used to flip-flop between two windows) | +| change to last-visited active window | ''[[commands:other|C-C-a]]'' (commonly used to flip-flop between two windows) | 
-| change to window by number | ''[[commands:select|C-<number>]]'' (only for windows 0 to 9) | +| change to window by number | ''[[commands:select|C-<number>]]'' (only for windows 0 to 9) | 
-| change to window by number or name | ''[[commands:select|C-' <number or title>]]''+| change to window by number or name | ''[[commands:select|C-' <number or title>]]''
-| change to next window in list | ''[[commands:next|C-t j]]'' or ''[[commands:next|C-<space>]]''+| change to next window in list | ''[[commands:next|C-a n]]'' or ''[[commands:next|C-<space>]]''
-| change to previous window in list | ''[[commands:prev|C-t u]]'' or ''[[commands:prev|C-a <backspace>]]''+| change to previous window in list | ''[[commands:prev|C-a p]]'' or ''[[commands:prev|C-a <backspace>]]''
-| see window list     | ''[[commands:windowlist|C-"]]'' (allows you to select a window to change to) | +| see window list     | ''[[commands:windowlist|C-"]]'' (allows you to select a window to change to) | 
-| show window bar       | ''[[commands:windows|C-w]]'' (if you don't have window bar) |+| show window bar       | ''[[commands:windows|C-w]]'' (if you don't have window bar) |
 | close current window  | Close all applications in the current window (including shell) | | close current window  | Close all applications in the current window (including shell) |
-| kill current window   | ''[[commands:kill|C-k]]'' (not recommended) | +| kill current window   | ''[[commands:kill|C-k]]'' (not recommended) | 
-| kill all windows   | ''[[commands:kill|C-\]]'' (not recommended) | +| kill all windows   | ''[[commands:kill|C-\]]'' (not recommended) | 
-| rename current window | ''[[commands:title|C-A]]'' |+| rename current window | ''[[commands:title|C-A]]'' |
  
 ===== Split screen ===== ===== Split screen =====
  
-| split display horizontally  | ''[[commands:split|C-S]]''+| split display horizontally  | ''[[commands:split|C-S]]''
-| split display vertically    | ''[[commands:split|C-| or C-V (for the vanilla vertical screen patch)]]'' +| split display vertically    | ''[[commands:split|C-|]]'' or ''[[commands:split|C-V]]'' (for the vanilla vertical screen patch) | 
-| jump to next display region | ''[[commands:focus|C-tab]]''+| jump to next display region | ''[[commands:focus|C-tab]]''
-| remove current region       | ''[[commands:remove|C-X]]''+| remove current region       | ''[[commands:remove|C-X]]''
-| remove all regions but the current one | ''[[commands:only|C-Q]]'' |+| remove all regions but the current one | ''[[commands:only|C-Q]]'' | 
 + 
 +===== Clipboard and Navigation ===== 
 + 
 +| freely navigate buffer | ''[[commands:copy|C-a [ ]]'' or ''[[commands:copy|C-a <esc>]]''
 +| toggle selection to copy | ''[[commands:copy|space]]''
 +| paste                       | ''[[commands:copy|C-a ] ]]'' 
 + 
 +===== Help ===== 
 + 
 +| See help | ''[[commands:help|C-a ?]]'' (lists keybindings) | 
 + 
 +The [[man:start|man page]] is the complete reference.
  
 ===== Scripting ===== ===== Scripting =====
-# the screen name session has to be valid or elsemessage: No screen session found.+ 
 +To any session //name//,
 | send a command to a named session                | ''screen -S //<name>// -X //<command>//'' | | send a command to a named session                | ''screen -S //<name>// -X //<command>//'' |
 | create a new window and run //ping example.com// | ''screen -S //<name>// -X screen //ping example.com//'' | | create a new window and run //ping example.com// | ''screen -S //<name>// -X screen //ping example.com//'' |
 | stuff characters into the input buffer\\ using bash to expand a newline character\\ ([[http://lists.gnu.org/archive/html/screen-users/2007-06/msg00012.html|from here]]) | <code bash>screen -S <name> [-p <page>] -X stuff $'quit\r'</code> | | stuff characters into the input buffer\\ using bash to expand a newline character\\ ([[http://lists.gnu.org/archive/html/screen-users/2007-06/msg00012.html|from here]]) | <code bash>screen -S <name> [-p <page>] -X stuff $'quit\r'</code> |
-| a full example <code bash>+ 
 + 
 +full example
 + 
 +<code bash>
 # run bash within screen # run bash within screen
 screen -AmdS bash_shell bash screen -AmdS bash_shell bash
Line 78: Line 80:
 # stuff 'exit\n' to exit bash session # stuff 'exit\n' to exit bash session
 screen -S bash_shell -X stuff $'exit\r' screen -S bash_shell -X stuff $'exit\r'
-</code> |+</code>
  
 ===== Misc ===== ===== Misc =====
  
-| redraw window               | ''[[commands:redisplay|C-C-l]]'' +| redraw window               | ''[[commands:redisplay|C-C-l]]''
-| enter copy mode | ''[[commands:copy|C-t []]'' or ''[[commands:copy|C-t <esc>]]'' (also used for viewing scrollback buffer) | +| monitor window for activity | ''[[commands:monitor|C-M]]''
-| paste                       | ''[[commands:paste|C-t ] ]]''  +| monitor window for silence  | ''[[commands:silence|C-_]]''
-| monitor window for activity | ''[[commands:monitor|C-M]]''+| enter digraph (for producing non-ASCII characters) | ''[[commands:digraph|C-C-v]]''
-| monitor window for silence  | ''[[commands:silence|C-_]]''+| lock (password protect) session | ''[[commands:lockscreen|C-x]]''
-| enter digraph (for producing non-ASCII characters) | ''[[commands:digraph|C-C-v]]''+| enter screen command        | ''[[commands:colon|C-:]]''
-| lock (password protect) display | ''[[commands:lockscreen|C-x]]''+| enable logging in the screen session | ''[[commands:logging|C-H]]'' |
-| enter screen command        | ''[[commands:colon|C-:]]''+
-| enable logging in the screen session | C-H | +
-| getting out of the screen session | exit | +
  
 ===== Scrollback-buffer ===== ===== Scrollback-buffer =====
Line 98: Line 96:
 In copy mode, one can navigate the scrollback buffer in various ways: In copy mode, one can navigate the scrollback buffer in various ways:
  
-| half page up | C-u | +| half page up | C-u |           | half page down | C-d 
-| half page down | C-d |+| back | C-b |                   | forward | C-f |
 | cursor left/down/up/right | h/j/k/l | | cursor left/down/up/right | h/j/k/l |
- 

User Tools