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 for tmux v3.6a · macOS Sonoma/Sequoia, Ubuntu 24.04 LTS, Windows WSL2
Select Your Prefix Key:

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

📁 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
Detach other clients
Ctrl+b D
Previous session
Ctrl+b (
Next session
Ctrl+b )
Rename current session
Ctrl+b $
Interactive session list
Ctrl+b s
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 .

⬛ Panes

Split horizontally
Ctrl+b %
Split vertically
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 pane (hold keys)
Ctrl+b Ctrl+↑↓←→
Synchronize panes
setw synchronize-panes
Cycle pane layouts
Ctrl+b Space

📋 Copy Mode (Scroll)

Enter copy mode (Scroll Up)
Ctrl+b [
Scroll Up / Down
PgUp / PgDn
Paste buffer
Ctrl+b ]
List buffers
Ctrl+b =
Navigate (vi)
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
Ctrl+b Ctrl+f
Start selection
v / Space
Copy selection
y / Enter
Exit copy mode
q Esc

⌨️ Command Mode

Open command prompt
Ctrl+b :
List all key bindings
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
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
    | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?)(diff)?$'"
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 → Configure tmux →