You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
within screen sessions:
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>
list running sessions/screens
screen -ls
attach to a running session
screen -x
… 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.)
detach a running session
screen -d <name>
Escape key
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. This is useful when working with screen within screen. For example C-a a n will move screen to a new window on the screen within screen.
stuff characters into the input buffer
using bash to expand a newline character
(from here)
screen-S<name>[-p <page>]-X stuff $'quit\r'
a full example
# run bash within screenscreen-AmdS bash_shell bash# run top within that bash sessionscreen-S bash_shell -p 0 -X stuff $'top\r'# ... some time later# stuff 'q' to tell top to quitscreen-S bash_shell -X stuff 'q'# stuff 'exit\n' to exit bash sessionscreen-S bash_shell -X stuff $'exit\r'