3. screen & tmux
• screen is a full-screen window manager that
multiplexes a physical terminal between several
processes, typically interactive shells.
• tmux is a terminal multiplexer, switch easily between
several programs in one terminal.
• screen and tmux is a software application that can
be used to multiplex several virtual consoles,
allowing a user to access multiple separate terminal
sessions inside a single terminal window or remote
terminal session.
6. often shortcut key
key binding shortcut key description
help C-a ? Show key bindings
screen C-a c
Create a new window with a shell and switch to
that window
detach C-a d Detach screen from this terminal
quit C-a Kill all windows and terminate screen
windowlist C-a " Present a list of all windows for selection
next C-a n Switch to the next window
prev C-a p Switch to the previous window
log C-a H
Begins/ends logging of the current window to
the file "screenlog.n"
copy C-a [ Enter copy/scrollback mode
paste C-a ]
Write the contents of the paste buffer to the stdin
queue of the current window
7. screen configuration -‐‑ 1
# Display the copyright notice during startup
startup_message off
# Set scrollback line
defscrollback 1024
# Set default encoding using utf8
defutf8 on
# Set visual bell
vbell on
# Set split status always on
caption splitonly "%{= bK} %{= bG} [%n] %t @ %H"
§ Configuration file: ~/.screenrc
11. tmux and screen key map
key binding screen tmux
help C-a ? C-b ?
screen C-a c C-b c
detach C-a d C-b d
quit C-a C-b ?
windowlist C-a " C-b w
next C-a n C-b n
prev C-a p C-b p
log C-a H none
copy C-a [ C-b [
paste C-a ] (enter) C-b ] (space)