tmux is a terminal multiplexer includes most features of screen. tmux.github.io is the main reference. There is an online reference book. A Quick and Easy Guide to tmux helped me get started. More shortcuts.
Some commands (all prefixed with control-b):
- % - side by side pane
- " - top over bottom pane
- arrow keys - jump pane to pane
- ctrl-d - close a pane
- d - detach
- D - detach with choice
- ? - available commands list
- z - pane to full screen, again to shrink
- , - rename window
- { - move pane left
- } - move pane right
- q - show pane numbers
- ; - last pane
- [ - enter scroll mode with cursor keys
- Resize Pane
- :resize-pane -<DURL> <x> [ Down, Up, Right, Left ] [relative count]
- :resize-pane -t <pane> -y <val> [pane number] [absolute height]
- :resize-pane -t <pane> -x <val> [pane number] [absolute width]
- windows (virtual desktop)
- c - new window
- p - previous window
- n - next window
- number - window number from status bar
- l - last window
- Session management
- tmux ls - running session list
- tmux attach -t 0
- tmux new -s sessionname
- tmux rename-session -t 0 sessionname
- tmux attach -t sessionname
- Mouse Ops
- :set -g mouse on - click on windows, use scroll wheel
- shift + drag: highlight & copy
Extra resources:
From The Tmux Menagerie, here are some workflow keystrokes which may help organization:
named sessions, from the shell (from within tmux use 'ctrl-b :':
- tmux new -s git
- tmux new -s coding
Additional commands
- ctrl-b s - shows all sessions
- ctrl-b w - shows all windows
- ctrl-b 0 - window 0 (home base)
- ctrl-b c - new window
- ctrl-b , - rename window
From Tmux Tutorial
- Tmux has sessions, windows, and panes. The hierarchy is that Tmux could have multiple sessions, a session could have multiple windows, a window could have multiple panes.

