# Multiple terminals with screen

Multiple terminals
# cat multiple_terminals.screen
bindkey -k k5 focus up # Previous region
bindkey -k k6 focus down # Next region
bindkey -k kP copy # Scrollback on (up)
bindkey -k kN copy # Scrollback on (down)
bindkey "^[" quit # ESC to quit

defscrollback 10000

split
split
split

screen -t Terminal-0 tail -f /var/log/syslog
focus down

screen -t Terminal-1 tail -f /var/log/messages
focus down

screen -t Terminal-2 tail -f /var/log/auth.log
focus down

screen -t Terminal-3 tail -f /var/log/error
focus top
# screen -S screen_tail -c multiple_terminals.screen

Some key bindings

Ctrl+a \ (quit) Kill all windows and terminate screen
Ctrl+a tab (focus) Switch the input focus to the next region
Ctrl+a n (next) Switch to the next window
Ctrl+a p (prev) witch to the previous window
Ctrl+a w (windows) Show a list of window
Ctrl+a [ (copy) Enter copy/scrollback mode
Ctrl+a ] (paste) Write the contents of the paste buffer to the stdin queue of the current window
Ctrl+a ? (help) Show key bindings

More information
# man screen

No comments: