Remember: in screen
, all screen
-related commands are prefixed by ctr-a
(which means pressing ctrl
and a
together, and then pressing the followup character).
The 4 most basic commands (if you're new to screen, learn only these):
ctrl-a c
-> createate new windowctrl-a ctrl-a
-> toggle between latest windowsctrl-a "
-> show all windows and choose using up/down arrowsctrl-a d
-> detach window
Less useful basics:
ctrl-a A
-> set widow namectrl-a w
-> show all windowctrl-a 1|2|3|…
-> switch to window nctrl-a ?
-> helpctrl-a [
-> start copy / scroll up; to copy: (1) move cursor to the start of the region to-be-copied; (2) press ENTER or space to start selecting chars and move towards the end of the region to-be-copied; (3) press ENTER / space to copy the selected chars to the bufferctrl-a ]
-> paste from buffer
- screen –DR -> list of detached screen
- screen –r PID -> attach detached screen session (same with
-x
instead of-r
) - screen –dmS MySession -> start a detached screen session
- screen –r MySession -> attach screen session with name MySession
- ctrl a S -> create vertically split screen
- ctrl a TAB -> switch between split screens
- ctrl a Q -> Kill all regions but the current one.
- ctrl a X -> remove active window from split screen
- ctrl a O -> logout active window (disable output)
- ctrl a I -> login active window (enable output)