Tmux Cheatsheet

Interactive quick reference for tmux shortcuts

Sessions

tmux new -s name
Create a new named session
tmux ls
List all sessions
tmux attach -t name
Attach to a session
tmux kill-session -t name
Kill a session
Prefix+d
Detach from current session
Prefix+s
List and switch sessions
Prefix+$
Rename current session
Prefix+(
Switch to previous session
Prefix+)
Switch to next session

Windows

Prefix+c
Create a new window
Prefix+,
Rename current window
Prefix+w
List all windows
Prefix+n
Go to next window
Prefix+p
Go to previous window
Prefix+0-9
Go to window by number
Prefix+&
Kill current window
Prefix+l
Toggle last active window

Panes

Prefix+%
Split pane vertically
Prefix+"
Split pane horizontally
Prefix+arrow
Move to pane in direction
Prefix+o
Cycle through panes
Prefix+x
Kill current pane
Prefix+z
Toggle pane zoom (fullscreen)
Prefix+{
Swap pane left
Prefix+}
Swap pane right
Prefix+q
Show pane numbers
Prefix+Space
Toggle between pane layouts
Prefix+!
Convert pane to window

Pane Resizing

Prefix+Ctrl+arrow
Resize pane in direction
Prefix+Alt+arrow
Resize pane (5 cells)
:resize-pane -D 10
Resize pane down by 10 cells
:resize-pane -U 10
Resize pane up by 10 cells
:resize-pane -L 10
Resize pane left by 10 cells
:resize-pane -R 10
Resize pane right by 10 cells

Copy Mode

Prefix+[
Enter copy mode
q
Quit copy mode
Space
Start selection (in copy mode)
Enter
Copy selection (in copy mode)
Prefix+]
Paste buffer
/ or ?
Search forward / backward
n / N
Next / previous search match
g / G
Go to top / bottom

Misc

Prefix+:
Enter command mode
Prefix+t
Show clock
Prefix+?
List all keybindings
Prefix+r
Reload tmux config (if bound)
tmux source ~/.tmux.conf
Reload config from shell
:setw synchronize-panes
Toggle sync input across panes

Prefix is Ctrl+b by default