Screen cheatsheet
Found this list I’ve compiled some time ago. It might be useful to someone:
General
screen - start a session screen -S name - start a session with a certain name screen -ls - list available sessions screen -r name - reattach to screen session screen -x name - attaches to a session in use (not detached) - content will be displayed on both ends C-a :sessioname [name] - change session name C-a d - decouple from screen C-a C-\ - kill screen and all processes under it
Window Management
C-a c - create window C-a A - change window name C-a K - kill the window C-a C - clear the screen
Navigation
C-a “ - get list of windows C-a SPACE - toggle between windows (alt-tab) C-a n - next window C-a p - previous window C-a [x] - go to window [x] C-a N - Show the number (and title) of the current window.
Editing
C-a [ - copy mode C-a ] - paste
Monitoring
C-a _ - start monitoring C-a M - stop monitoring
Regions
C-a S - split screen (a session will have to be picked for the bottom region C-a “) C-a TAB - switch between regions C-a Q - quit split screen - current region’s window is used C-a [x] - display window [x] in the current region C-a c - create a new window in the current region
Multiuser
C-a :multiuser on - turn multiuser on C-a :aclchg paul +r "#" - give user paul read access to this session (all windows) C-a :acldel paul - remove all permission for user paul screen -e john/ - user paul can connect to john’s session
$HOME/.screenrc
vbell_msg “beep” - change the visual bell bing ‘R’ screen ssh paul@test - bind C-a R to ‘open new window with a shell to test’ screen N ssh paul@test - create window N at startup with a shell to test hardstatus on hardstatus alwayslastline - status line as the last line of the window hardstatus string “%w=%m/%d %c” - status line example (see “String escapes” manual pages) attrcolor b "R" - display bold text red attrcolor u "-u b" - display underlined text bold




