This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
quick_reference [2017-07-26 17:29] 181.110.117.188 Remove duplicate command |
quick_reference [2021-02-19 19:39] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== SCREEN Quick Reference ====== | ||
+ | |||
+ | ===== Getting in ===== | ||
+ | |||
+ | | start a new screen session with session name | '' | ||
+ | | list running sessions/ | ||
+ | | attach to a running session | '' | ||
+ | | attach to session //name// | '' | ||
+ | | the " | ||
+ | |||
+ | ===== Escape key ===== | ||
+ | |||
+ | All screen commands are prefixed by an escape key, by default '' | ||
+ | (that' | ||
+ | to the programs in screen, use '' | ||
+ | |||
+ | ===== Getting out ===== | ||
+ | |||
+ | | detach | '' | ||
+ | | detach and logout (quick exit) | '' | ||
+ | | exit screen | '' | ||
+ | | force-exit screen | '' | ||
+ | | getting out of the screen session | exit | | ||
+ | |||
+ | ===== Window Management ===== | ||
+ | |||
+ | | create new window | '' | ||
+ | | change to last-visited active window | '' | ||
+ | | change to window by number | '' | ||
+ | | change to window by number or name | '' | ||
+ | | change to next window in list | '' | ||
+ | | change to previous window in list | '' | ||
+ | | see window list | '' | ||
+ | | show window bar | '' | ||
+ | | close current window | ||
+ | | kill current window | ||
+ | | kill all windows | ||
+ | | rename current window | '' | ||
+ | |||
+ | ===== Split screen ===== | ||
+ | |||
+ | | split display horizontally | ||
+ | | split display vertically | ||
+ | | jump to next display region | '' | ||
+ | | remove current region | ||
+ | | remove all regions but the current one | '' | ||
+ | |||
+ | ===== Clipboard and Navigation ===== | ||
+ | |||
+ | | freely navigate buffer | '' | ||
+ | | toggle selection to copy | '' | ||
+ | | paste | '' | ||
+ | |||
+ | ===== Help ===== | ||
+ | |||
+ | | See help | '' | ||
+ | |||
+ | The [[man: | ||
+ | |||
+ | ===== Scripting ===== | ||
+ | |||
+ | To any session //name//, | ||
+ | | send a command to a named session | ||
+ | | create a new window and run //ping example.com// | ||
+ | | stuff characters into the input buffer\\ using bash to expand a newline character\\ ([[http:// | ||
+ | |||
+ | |||
+ | A full example: | ||
+ | |||
+ | <code bash> | ||
+ | # run bash within screen | ||
+ | screen -AmdS bash_shell bash | ||
+ | # run top within that bash session | ||
+ | screen -S bash_shell -p 0 -X stuff $' | ||
+ | |||
+ | # ... some time later | ||
+ | |||
+ | # stuff ' | ||
+ | screen -S bash_shell -X stuff ' | ||
+ | # stuff ' | ||
+ | screen -S bash_shell -X stuff $' | ||
+ | </ | ||
+ | |||
===== Misc ===== | ===== Misc ===== | ||
| redraw window | | redraw window | ||
- | | enter copy mode | '' | ||
- | | paste | '' | ||
| monitor window for activity | '' | | monitor window for activity | '' | ||
| monitor window for silence | | monitor window for silence | ||
| enter digraph (for producing non-ASCII characters) | '' | | enter digraph (for producing non-ASCII characters) | '' | ||
- | | lock (password protect) | + | | lock (password protect) |
| enter screen command | | enter screen command | ||
- | | enable logging in the screen session | '' | + | | enable logging in the screen session | '' |
+ | |||
+ | ===== Scrollback-buffer ===== | ||
+ | |||
+ | In copy mode, one can navigate the scrollback buffer in various ways: | ||
+ | | half page up | C-u | | half page down | C-d | | ||
+ | | back | C-b | | forward | C-f | | ||
+ | | cursor left/ |