Using GNU's Screen
whole reference: http://www.gnu.org/software/screen/manual/screen.html
this page is adapted from http://aperiodic.net/screen/quick_reference
All screen commands are prefixed by an escape key, by default C-a (that's Control-a, sometimes written ^A). To send a literal C-a to the programs in screen, use C-a a.
Getting help |
C-a ? (also lists keybindings) |
Getting in
start a new screen session screen with session name |
screen -S ''<name>'' |
||
list running sessions/screens |
screen -ls |
||
attach to a running session |
screen -r |
||
.. to session with 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.) |
Getting out
detach |
C-a d |
||
detach and logout (quick exit) |
C-a D D |
||
exit screen |
exit all of the programs in screen. |
||
force-exit screen |
C-a C-\ (not recommended)) |
Window Management
create new window |
C-a c |
||
change to last-visited active window |
C-a C-a (commonly used to flip-flop between two windows) |
||
change to window by number |
C-a <number> (only for windows 0 to 9) |
||
change to window by number or name |
C-a ' <number or title> |
||
change to next window in list |
C-a n or C-a <space> |
||
change to previous window in list: |
C-a p |
||
see window list |
C-a ” (allows you to select a window to change to) |
||
show window bar |
C-a w (if you don't have window bar) |
||
close current window |
Close all applications in the current window (including shell) |
||
kill current window |
C-a k (not recommended) |
||
rename current window |
C-a A |
Split screen
split display |
C-a S |
||
jump to next display region |
C-a tab |
||
remove current region |
C-a X |
||
remove all regions but the current one |
C-a Q |
Advanced commands
redraw window |
C-a C-l |
||
enter copy mode |
C-a [ (also used for viewing scrollback buffer) |
||
paste |
C-a ] |
||
monitor window for activity |
C-a M |
||
monitor window for silence |
C-a _ |
||
enter digraph |
C-a C-v |
||
lock (password protect) display |
C-a x |
||
enter screen command |
C-a : |
scrollback buffer
Navigating in scrollback mode will be pretty familiar to VI users
h - Move the cursor left by one character j - Move the cursor down by one line k - Move the cursor up by one line l - Move the cursor right by one character 0 - Move to the beginning of the current line $ - Move to the end of the current line. G - Moves to the specified line (defaults to the end of the buffer). C-u - Scrolls a half page up. C-b - Scrolls a full page up. C-d - Scrolls a half page down. C-f - Scrolls the full page down.In addition to traditional navigation, Screen allows you to search the scrollback buffer using the following commands:
/ - Search forward ? - Search backward