tmux Cheat Sheet

prefix = Ctrl+b (default)

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
Useful commands
:new-window
:split-window -h
:split-window -v
:resize-pane -D 10
:setw synchronize-panes on
:set -g mouse on

Misc / Useful

prefix + ?
list all keybindings
prefix + t
show clock
prefix + ~
show messages
prefix + i
window info
prefix + r
reload config*
* add to .tmux.conf: bind r source ~/.tmux.conf

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 prefix with set -g prefix C-a and unbind C-b