Reference · Shortcuts · Printable

The Ultimate tmux Cheat Sheet & Shortcuts

A comprehensive visual guide to all tmux shortcuts and commands. Organized by category for speed, every key binding dynamically updates to match your preferred prefix modifier.

Verified against tmux 3.7c (official manual and a source build)

Want it offline? Print the page or save it as a PDF, or download a plain-text copy.

Select Your Prefix Key:

Currently displaying shortcuts with prefix: Ctrl+b. Click any option above to dynamically update the entire reference.

tmux keyboard shortcuts

Every binding below updates to match the prefix key you selected above.

📁 Sessions

New session
tmux
New named session
tmux new -s [name]
List all sessions
tmux ls
Attach last session
tmux a
Attach named session
tmux a -t [name]
Detach from session
Ctrl+b d
Choose a client to detach
Ctrl+b D
Previous session
Ctrl+b (
Next session
Ctrl+b )
Rename current session
Ctrl+b $
Interactive session list
Ctrl+b s
Switch to last session
Ctrl+b L
Kill specific session
tmux kill-session -t [name]
Kill ALL sessions (Server)
tmux kill-server

🪟 Windows

Create window
Ctrl+b c
Rename window
Ctrl+b ,
Next window
Ctrl+b n
Previous window
Ctrl+b p
Last (toggled) window
Ctrl+b l
Select by number
Ctrl+b 0-9
Window list (interactive)
Ctrl+b w
Find window
Ctrl+b f
Swap windows
tmux swap-window -s 2 -t 1
Renumber windows
tmux move-window -r
Kill window
Ctrl+b &
Move window
Ctrl+b .
Select window by index (prompt)
Ctrl+b '

⬛ Panes

Split left / right (side by side)
Ctrl+b %
Split top / bottom (stacked)
Ctrl+b "
Toggle last active pane
Ctrl+b ;
Navigate panes
Ctrl+b ↑↓←→
Select next pane
Ctrl+b o
Select pane by number
Ctrl+b q 0-9
Show pane numbers
Ctrl+b q
Toggle zoom (fullscreen)
Ctrl+b z
Kill pane
Ctrl+b x
Swap pane (forward)
Ctrl+b }
Swap pane (backward)
Ctrl+b {
Break pane to window
Ctrl+b !
Resize by 1 cell (repeatable)
Ctrl+b Ctrl+↑↓←→
Resize by 5 cells (repeatable)
Ctrl+b Alt+↑↓←→
Synchronize panes
setw synchronize-panes
Cycle pane layouts
Ctrl+b Space
Preset layouts (even, main, tiled)
Ctrl+b Alt+1…Alt+7
Spread panes out evenly
Ctrl+b E
Mark / unmark pane
Ctrl+b m

📋 Copy Mode (Scroll)

Keys shown are tmux's vi defaults. tmux uses emacs keys unless $EDITOR or $VISUAL contains “vi”, so add set -g mode-keys vi to be sure.

Enter copy mode (Scroll Up)
Ctrl+b [
Scroll Up / Down
PgUp / PgDn
Paste buffer
Ctrl+b ]
Choose buffer to paste
Ctrl+b =
List buffers
Ctrl+b #
Navigate (vi keys)
h j k l
Line Start / End
0 $
Search forward / back
/ / ?
Next / prev match
n / N
Move word (vi)
w / b
Jump Top / Bottom
g G
Page Up / Down (vi)
Ctrl+b / Ctrl+f
Start selection (default)
Space
Rectangle / line select
v / V
Copy selection and exit
Enter
Clear selection / exit
Esc / q

⌨️ Command Mode

Open command prompt
Ctrl+b :
List all key bindings
Ctrl+b ?
Describe one key
Ctrl+b /
Browse & edit options and keys
Ctrl+b C
Show message log
Ctrl+b ~
Reload config
Ctrl+b : source ~/.tmux.conf
tmux version
tmux -V
Server info
tmux info
Show all options
tmux show-options -g

🔧 Miscellaneous

Set option (all sessions)
tmux set -g [opt] [val]
Set window option
tmux setw -g [opt] [val]
Enable mouse mode
set -g mouse on
Refresh client
Ctrl+b r
Clock mode
Ctrl+b t
Suspend client
Ctrl+b Ctrl+z
Send prefix to nested tmux
Ctrl+b Ctrl+b
Masterclass

System Clipboard & Remote OSC 52 Integration

Seamlessly copy text from remote SSH tmux sessions straight into your local OS clipboard.

1. Vi Copy Mode Setup

Enable native Vim-style visual selection (v to begin selection, y to yank/copy):

setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection-and-cancel

2. Remote SSH OSC 52 (No X11 Needed)

Copy text from cloud virtual machines into your local macOS/Windows clipboard using ANSI escape sequences:

# Enable OSC 52 clipboard pass-through
set -s set-clipboard on
set -as terminal-features ',xterm-256color:clipboard'

3. Seamless Neovim Pane Navigation

Navigate effortlessly between Neovim splits and tmux panes using identical Ctrl+h/j/k/l shortcuts:

# Smart pane switching with awareness of Vim splits
vim_pattern='(\S+/)?g?\.?(view|l?n?vim?x?|fzf)(diff)?(-wrapped)?'
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
    | grep -iqE '^[^TXZ ]+ +${vim_pattern}$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h'  'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j'  'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k'  'select-pane -U'
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l'  'select-pane -R'

Need full command explanations with flags and examples?

The /commands/ page goes deep: every command documented with all options, use cases, and copy-ready examples.

Full Command Reference → Session Management → Configure tmux → Config Generator →