Tmux Keyboard Shortcuts: The Complete List
Tmux (terminal multiplexer) lets you run, split, and manage multiple terminal sessions inside a single window and keep them running even after you disconnect. If you SSH into servers, juggle multiple long-running processes, or just want to stop tabbing between fifteen terminal windows, tmux shortcuts are the fastest way to work.
Every tmux shortcut starts the same way: press the prefix key (Ctrl+b by default), release it, then press the follow-up key. For example, Ctrl+b d means “hold Ctrl and press b, let go of both, then press d” that detaches your session.
This page covers every shortcut you’ll actually use: sessions, windows, panes, copy mode, and how to customize the prefix key itself plus a free downloadable PDF cheat sheet.
Quick answer: the three shortcuts to memorize first are Ctrl+b d (detach), Ctrl+b c (new window), and Ctrl+b % (split pane vertically). Everything else builds on those.
Tmux Session Shortcuts
A session is the top-level container in tmux it holds all your windows and panes. Sessions are what make tmux powerful over SSH: you can detach, close your laptop, and reattach later exactly where you left off.
| Action | Shortcut / Command |
| Start a new session | tmux or tmux new |
| Start a new named session | tmux new -s myname |
| Start or attach if it exists | tmux new-session -A -s myname |
| Rename current session | Ctrl+b $ |
| Detach from session | Ctrl+b d |
| List all sessions | Ctrl+b s (interactive) or tmux ls |
| Attach to last session | tmux a |
| Attach to a named session | tmux a -t myname |
| Move to previous session | Ctrl+b ( |
| Move to next session | Ctrl+b ) |
| Kill (delete) a named session | tmux kill-session -t myname |
| Kill all sessions except current | tmux kill-session -a |
Tmux Window Shortcuts
A window works like a browser tab each one is a full-screen terminal inside your session. You can have as many as you need and switch between them instantly.
| Action | Shortcut |
| Create new window | Ctrl+b c |
| Rename current window | Ctrl+b , |
| Close current window | Ctrl+b & |
| List all windows | Ctrl+b w |
| Next window | Ctrl+b n |
| Previous window | Ctrl+b p |
| Switch to window by number | Ctrl+b 0–9 |
| Toggle last active window | Ctrl+b l |
| Find window by name | Ctrl+b f |
Tmux Pane Shortcuts
A pane is a split section inside a window this is how you get multiple terminals visible on screen at once, side by side or stacked.
| Action | Shortcut |
| Split pane vertically (side-by-side) | Ctrl+b % |
| Split pane horizontally (stacked) | Ctrl+b “ |
| Switch to next pane | Ctrl+b o |
| Toggle last active pane | Ctrl+b ; |
| Move between panes by direction | Ctrl+b + Arrow key |
| Show pane numbers | Ctrl+b q |
| Switch to pane by number | Ctrl+b q then 0–9 |
| Toggle pane zoom (fullscreen a pane) | Ctrl+b z |
| Close current pane | Ctrl+b x |
| Move current pane left | Ctrl+b { |
| Move current pane right | Ctrl+b } |
| Toggle between pane layouts | Ctrl+b Space |
| Resize pane (hold arrow keys) | Ctrl+b + hold Arrow key |
| Convert pane into its own window | Ctrl+b ! |
Tip: Ctrl+b z (zoom) is one of the most underused shortcuts. Instead of closing and reopening panes to focus on one task, zoom in, work, then zoom out your layout stays exactly as you left it.
Tmux Copy Mode Shortcuts
Copy mode lets you scroll back through terminal output and copy text without touching your mouse. It uses vi-style navigation by default in most modern tmux configs.
| Action | Shortcut |
| Enter copy mode | Ctrl+b [ |
| Exit copy mode | q |
| Move cursor left / down / up / right | h / j / k / l |
| Move forward one word | w |
| Move backward one word | b |
| Go to top of scrollback | g |
| Go to bottom of scrollback | G |
| Search forward | / |
| Search backward | ? |
| Next search match | n |
| Previous search match | N |
| Start text selection | Space |
| Clear selection | Esc |
| Copy selection to buffer | Enter |
| Paste from buffer | Ctrl+b ] |
If your h j k l navigation isn’t working in copy mode, your tmux isn’t set to vi keys yet see the customization section below for the one-line fix.
Tmux Shortcuts on Mac vs Linux vs WSL
The good news: tmux shortcuts are identical across macOS, Linux, and WSL Ctrl+b is the prefix everywhere, because tmux runs inside the terminal application itself, not the OS.
Where people actually run into trouble:
- macOS + iTerm2/Terminal.app: Ctrl works the same as Linux. The confusion usually comes from Option-as-Meta settings for other apps tmux itself doesn’t need that.
- macOS trackpad users: if you’re used to Cmd for everything, remember tmux always uses Ctrl, not Cmd, for the prefix.
- WSL (Windows Subsystem for Linux): shortcuts work exactly as on native Linux once you’re inside a WSL terminal but Windows Terminal may intercept certain key combos (like Ctrl+Shift+letter) before they reach tmux. Stick to the default Ctrl+b prefix to avoid conflicts.
- Any platform, if Ctrl+b feels awkward: remap the prefix to Ctrl+a (see below) this is the single most common tmux customization, regardless of OS.
How to Customize Your Tmux Prefix Key
Ctrl+b is a stretch for a lot of hands, so many users remap the prefix to Ctrl+a (matching GNU Screen) instead.
1. Open (or create) your config file: nano ~/.tmux.conf
2. Add these two lines:
unbind C-b
set -g prefix C-a
3. Add this line so Ctrl+a also works to switch to the last window (optional but common):
bind C-a send-prefix
4. Reload the config without restarting tmux:
tmux source-file ~/.tmux.conf
To enable vi-style keys in copy mode (recommended), add this line to the same file:
setw -g mode-keys vi
Download the PDF
Want this list on paper? Download the Tmux Shortcuts PDF for a quick-reference sheet you can keep next to your keyboard.
FAQs
What is the default tmux prefix key?
Ctrl+b. Press it, release both keys, then press the shortcut key that follows.
How do I switch to the next window in tmux?
Press Ctrl+b n for the next window, or Ctrl+b p for the previous one. You can also jump directly to a window by number with Ctrl+b followed by the number key (0–9).
How do I close a window in tmux?
Press Ctrl+b &, then confirm with y when prompted.
How do I switch windows in tmux by name instead of number?
Press Ctrl+b f, type part of the window name, and press Enter.
What are tmux hotkeys on Mac?
Identical to Linux Ctrl+b is the prefix on macOS too. There’s no separate “Mac version” of tmux shortcuts; the only differences come from your terminal app’s own key interception, not tmux itself.
How do I see a full list of tmux key bindings?
Press Ctrl+b ? inside any tmux session, or run tmux list-keys from the command line. Press q to exit the list.
What’s the difference between tmux shortcuts and tmux commands?
Shortcuts are keypresses starting with the prefix (Ctrl+b + key). Commands are typed out after entering command mode with Ctrl+b :, e.g. :kill-session. Anything you can do with a shortcut can usually also be done as a typed command, and vice versa.
How do I detach from tmux without closing my session?
Ctrl+b d. Your session, windows, and panes keep running in the background reattach anytime with tmux a.
Can I customize tmux keybindings?
Yes edit ~/.tmux.conf and reload it with tmux source-file ~/.tmux.conf. The most common customization is remapping the prefix key (see the customization section above).
How many keyboard shortcuts does tmux have by default?
Tmux ships with dozens of default bindings run Ctrl+b ? or tmux list-keys in your terminal to see the exact list for your installed version, since it can vary slightly by release.
Conclusion
Tmux rewards muscle memory more than any other terminal tool once Ctrl+b d, Ctrl+b c, and Ctrl+b % become second nature, you’ll stop reaching for the mouse or juggling a dozen terminal windows entirely. Start with the shortcut table above, keep this page bookmarked (or print the PDF) for the shortcuts you use less often, and don’t be afraid to remap the prefix key if Ctrl+b doesn’t fit your hands most experienced users end up customizing at least that much.
READ NEXT:





