Sessions
| tmux | start new session |
| tmux new -s name | start named session |
| tmux ls | list sessions |
| tmux attach -t name | attach to session |
| tmux kill-session -t name | kill session |
| prefix + $ | rename session |
| prefix + d | detach |
| prefix + s | list/switch sessions |
| prefix + ( | previous session |
| prefix + ) | next session |
Windows
| prefix + c | new window |
| prefix + , | rename window |
| prefix + & | kill window |
| prefix + n | next window |
| prefix + p | previous window |
| prefix + 0-9 | switch to window number |
| prefix + w | list windows |
| prefix + f | find window |
| prefix + . | move window |
Copy mode
| prefix + [ | enter copy mode |
| Space | start select |
| Enter | copy selection |
| prefix + ] | paste |
| q | quit |
| / | search forward |
| ? | search backward |
| n / N | next / previous hit |
Panes
| prefix + % | split vertical |
| prefix + " | split horizontal |
| prefix + x | kill pane |
| prefix + z | zoom/unzoom pane |
| prefix + arrows | navigate panes |
| prefix + o | cycle panes |
| prefix + ; | last active pane |
| prefix + { | move pane left |
| prefix + } | move pane right |
| prefix + ! | break pane to window |
| prefix + q | show pane numbers |
| prefix + Ctrl+arrows | resize pane |
| prefix + Space | cycle layouts |
Command line
| prefix + : | open prompt |
| :new-window | new window |
| :split-window -h | split horizontal |
| :split-window -v | split vertical |
| :resize-pane -D 10 | resize pane down 10 rows |
| :setw synchronize-panes on | type into all panes at once |
| :set -g mouse on | enable mouse support |
Misc / useful
| prefix + ? | list all keybindings |
| prefix + t | show clock |
| prefix + ~ | show messages |
| prefix + i | window info |
| prefix + r | reload config* |
Common .tmux.conf options
set -g mouse on # enable mouse support
set -g history-limit 10000 # increase scrollback buffer
set -g base-index 1 # start windows at 1
setw -g mode-keys vi # use vi keys in copy mode
set -g default-terminal "screen-256color" # 256 color support
set -sg escape-time 0 # no delay for escape key
set -g status-right "%H:%M %d-%b-%y" # clock in status bar
Tip: change the prefix with set -g prefix C-a and unbind C-b.