tmux Keyboard Shortcuts

Complete tmux keyboard shortcuts reference — 73 shortcuts across 7 categories. Quick reference cheat sheet for Windows & Mac.

Every tmux shortcut starts with the prefix, Ctrl + B by default, followed by one more key — the table writes each as a sequence. The tool is worth the learning curve for one reason: a session survives your SSH connection dropping, and a single Ctrl + B, D detaches while everything keeps running.

Sessions (8)

ShortcutAction
Ctrl + B, DDetach client
Ctrl + B, $Rename session
Ctrl + B, SChoose session
Ctrl + B, (Previous session
Ctrl + B, )Next session
Ctrl + B, Shift + LLast session
Ctrl + B, Shift + DChoose client to detach
Ctrl + B, Ctrl + ZSuspend client

Windows (14)

ShortcutAction
Ctrl + B, CNew window
Ctrl + B, &Kill window
Ctrl + B, ,Rename window
Ctrl + B, NNext window
Ctrl + B, PPrevious window
Ctrl + B, LLast window
Ctrl + B, 0-9Select window by number
Ctrl + B, 'Select window by index
Ctrl + B, WChoose window
Ctrl + B, .Move window
Ctrl + B, FFind window
Ctrl + B, IWindow info
Ctrl + B, Alt + NNext window with activity
Ctrl + B, Alt + PPrevious window with activity

Panes (17)

ShortcutAction
Ctrl + B, %Split left and right
Ctrl + B, "Split top and bottom
Ctrl + B, XKill pane
Ctrl + B, ONext pane
Ctrl + B, ;Last pane
Ctrl + B, ↑/↓/←/→Select pane by direction
Ctrl + B, QShow pane numbers
Ctrl + B, ZZoom pane
Ctrl + B, {Swap with previous pane
Ctrl + B, }Swap with next pane
Ctrl + B, Ctrl + ORotate panes forwards
Ctrl + B, Alt + ORotate panes backwards
Ctrl + B, !Break pane to window
Ctrl + B, MMark pane
Ctrl + B, Shift + MClear marked pane
Ctrl + B, SpaceNext layout
Ctrl + B, Alt + 1-7Preset layouts

Resizing Panes (2)

ShortcutAction
Ctrl + B, Ctrl + ↑/↓/←/→Resize pane by one cell
Ctrl + B, Alt + ↑/↓/←/→Resize pane by five cells

Copy Mode & Buffers (6)

ShortcutAction
Ctrl + B, [Enter copy mode
Ctrl + B, ]Paste buffer
Ctrl + B, Page UpCopy mode and scroll up
Ctrl + B, #List paste buffers
Ctrl + B, =Choose buffer to paste
Ctrl + B, -Delete buffer

Copy Mode Navigation (vi keys) (20)

ShortcutAction
QExit copy mode
SpaceBegin selection
EnterCopy selection and exit
VRectangle selection
Shift + VSelect line
/Search forward
?Search backward
NRepeat search
Shift + NRepeat search reversed
GTop of history
Shift + GBottom of history
Ctrl + UHalf page up
Ctrl + DHalf page down
Ctrl + BPage up
Ctrl + FPage down
0Start of line
$End of line
WNext word
BPrevious word
%Matching bracket

Prompt & Help (6)

ShortcutAction
Ctrl + B, :Command prompt
Ctrl + B, ?List key bindings
Ctrl + B, TShow clock
Ctrl + B, RRedraw client
Ctrl + B, ~Show messages
Ctrl + B, Ctrl + BSend prefix
📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

Related Shortcut Pages

GNU Screen Zsh Bash / Shell Vim fzf kitty

Search 18,500+ shortcuts across 268 platforms

Explore All Platforms Practice Shortcuts
📜 Every shortcut on this page is taken from the official tmux documentation — man7.org
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.

Sessions: the reason to use tmux at all

Start work in a session, detach with Ctrl + B, D, close the laptop, and reattach later with tmux attach to find every shell exactly where it was. Ctrl + B, $ renames the session to something you will recognise in a week, Ctrl + B, S opens a picker to switch between sessions, and Ctrl + B, ( and Ctrl + B, ) cycle through them. Running a long job inside a session is the habit that ends "the connection dropped and the build died".

Windows and panes

Ctrl + B, C creates a window (a tab), Ctrl + B, N and Ctrl + B, P move between them, and Ctrl + B, 0-9 jumps by number; Ctrl + B, , renames the current one. Within a window, Ctrl + B, % splits into left and right panes and Ctrl + B, " into top and bottom. Ctrl + B, ↑/↓/←/→ moves focus by direction, Ctrl + B, Z zooms a pane to fill the window and back, and Ctrl + B, X kills the pane. Ctrl + B, ! promotes a pane to its own window when a split has outgrown its space.

Scrolling and copying

A terminal inside tmux does not scroll with the mouse wheel until you enter copy mode with Ctrl + B, [; then the vi keys apply — Ctrl + U and Ctrl + D for half pages, / and ? to search, G for the top of the scrollback. Space begins a selection, Enter copies it and leaves copy mode, and Ctrl + B, ] pastes. Q exits copy mode without copying. Copy mode uses emacs keys by default unless mode-keys vi is set in ~/.tmux.conf, which the table assumes.

When you forget a key

Ctrl + B, ? lists every binding in the running tmux, including any you have customised, and Ctrl + B, : opens a command prompt where any tmux command can be typed — kill-session, resize-pane -L 10, source-file ~/.tmux.conf. If the display becomes garbled after a resize, Ctrl + B, R redraws it.

Frequently asked questions

What is the tmux prefix and can I change it?

The prefix is Ctrl + B by default. Many people rebind it to Ctrl + A in ~/.tmux.conf with set -g prefix C-a; every shortcut here then starts with that instead.

How do I scroll up in tmux?

Enter copy mode with Ctrl + B, [ and use the arrow keys or Page Up; press Q to leave. Enabling mouse mode in ~/.tmux.conf lets the wheel scroll directly.

What is the difference between a window and a pane?

A window is a full-screen tab within the session; a pane is a split inside a window. Ctrl + B, C makes a window, Ctrl + B, % or " makes a pane.

How do I get back to a detached session?

Run tmux attach, or tmux attach -t name if there is more than one session. tmux ls lists them.

🤖 Ask AI about tmux shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok