Cheat sheet · tmux 3.8 · printable
tmux cheat sheet: every shortcut and key binding
Almost every tmux shortcut is the prefix key, Ctrl+b by default, followed by one more key: press Ctrl+b, let go, then press the key. Below are the 20 shortcuts you will use most, all 93 default bindings in tmux 3.8, the copy mode keys and the commands you type in your shell.
Changed your prefix? Pick it and every shortcut on this page updates. How to change it.
On this page
- The 20 tmux keyboard shortcuts you will use most
- Commands to type in your shell
- Keyboard map of every prefix key
- All 93 default key bindings
- Session shortcuts
- Window shortcuts
- Pane shortcuts
- Floating pane shortcuts new in 3.7 and 3.8
- Copy mode: scroll, search and copy
- Command prompt, help and display keys
- Mouse shortcuts and nested tmux
- New shortcuts since tmux 3.4
- Change the prefix key
- Copy to the system clipboard
- tmux cheat sheet PDF
- Frequently asked questions
- Where to go next
The 20 tmux keyboard shortcuts you will use most
Learn these first. They cover sessions, windows, panes and scrolling, which is most of what anyone does in tmux. The colors match the keyboard map and tables further down.
Sessions
- Ctrl+b dDetach. The session keeps running;
tmux attachbrings it back. - Ctrl+b sPick a session from a tree with previews
- Ctrl+b $Rename the session
- Ctrl+b Shift+TabSession switcher: type to filter new in 3.8
Windows (tabs)
- Ctrl+b cNew window
- Ctrl+b n Ctrl+b pNext / previous window
- Ctrl+b 0Go to window 0, and so on up to 9
- Ctrl+b ,Rename the window
- Ctrl+b wPick any window in any session
- Ctrl+b &Close the window (asks first)
Panes (splits)
- Ctrl+b %Split left and right (side by side)
- Ctrl+b "Split top and bottom (stacked)
- Ctrl+b ←Move to the pane on the left; any arrow works
- Ctrl+b zZoom the pane to full screen, press again to restore
- Ctrl+b xClose the pane (asks first)
- Ctrl+b Ctrl+←Resize by one cell; hold Ctrl and keep tapping arrows
Scroll, copy & help
- Ctrl+b [Scroll back (copy mode). q leaves.
- Ctrl+b ]Paste what you copied
- Ctrl+b :Type any tmux command
- Ctrl+b ?List every key binding
The mouse is on by default since tmux 3.8, so you can also click panes and windows, drag borders and scroll with the wheel. On 3.4 (Ubuntu 24.04) or older, add set -g mouse on to ~/.tmux.conf.
Commands to type in your shell
Starting, finding and ending sessions happens outside tmux, in your normal shell. These are the one-liners people look up most. Every command also has a long form and a short alias, listed on the tmux commands page.
| Command | What it does |
|---|---|
tmux | Start a new, unnamed session (numbered 0, 1, 2…) |
tmux new -s work | Start a session named work |
tmux ls | List sessions (no server running means there are none) |
tmux attach | Attach to the most recent session (tmux a works too) |
tmux attach -t work | Attach to the session named work |
tmux new -A -s work | Attach to work if it exists, otherwise create it |
tmux rename-session -t work dev | Rename a session from the shell |
tmux kill-session -t work | End one session and everything in it |
tmux kill-session -a | End every session except the current one |
tmux kill-server | End all sessions and exit tmux completely |
tmux source ~/.tmux.conf | Reload your config without restarting |
tmux list-keys -N | Print every key binding with a note |
tmux -V | Show the tmux version you have installed |
More detail on each of these, including what to do when attach says sessions should be nested with care, is in the sessions guide.
Keyboard map of every prefix key
Hover, tap or tab to a key to see what it does after the prefix. Colors show the group; a dot in the corner marks a binding added in tmux 3.5 or later. Gray keys do nothing by default, so they are free for your own bindings.
All 93 default key bindings
This is the complete prefix table of tmux 3.8, generated from a real build with no config (tmux list-keys), grouped by what each key controls. The third column is the tmux command the key runs, which is also what you would put in your own config. repeatable keys can be pressed again without the prefix for a moment (half a second, the repeat-time default).
Session shortcuts
Sessions & clients 9
| Keys | Action | Command it runs |
|---|---|---|
| Ctrl+b $ | Rename current session | command-prompt -I "#S" { rename-session "%%" } |
| Ctrl+b ( | Switch to previous client | switch-client -p |
| Ctrl+b ) | Switch to next client | switch-client -n |
| Ctrl+b D | Choose and detach a client from a list | choose-client -Z |
| Ctrl+b L | Switch to the last client | switch-client -l |
| Ctrl+b d | Detach the current client | detach-client |
| Ctrl+b s | Choose a session from a list | choose-tree -Zs |
| Ctrl+b Shift+Tab | Switch to a session new in 3.8 | new-pane -E -X … |
| Ctrl+b Ctrl+z | Suspend the current client | suspend-client |
There is no default key that kills a session. Press Ctrl+b s, move to the session and press x (tmux asks y/n), or press Ctrl+b : and type kill-session. The Ctrl+b ( and Ctrl+b ) notes in tmux say "client" because they move your client to the previous or next session.
Window shortcuts
Windows 24
| Keys | Action | Command it runs |
|---|---|---|
| Ctrl+b Tab | Switch to a window new in 3.8 | new-pane -E -X … |
| Ctrl+b & | Kill current window | confirm-before -p "kill-window #W? (y/n)" kill-window |
| Ctrl+b ' | Prompt for window index to select | command-prompt -p index { select-window -t ":%%" } |
| Ctrl+b , | Rename current window | command-prompt -I "#W" { rename-window "%%" } |
| Ctrl+b . | Move the current window | command-prompt { move-window -t "%%" } |
| Ctrl+b 0 | Select window 0 | select-window -t :=0 |
| Ctrl+b 1 | Select window 1 | select-window -t :=1 |
| Ctrl+b 2 | Select window 2 | select-window -t :=2 |
| Ctrl+b 3 | Select window 3 | select-window -t :=3 |
| Ctrl+b 4 | Select window 4 | select-window -t :=4 |
| Ctrl+b 5 | Select window 5 | select-window -t :=5 |
| Ctrl+b 6 | Select window 6 | select-window -t :=6 |
| Ctrl+b 7 | Select window 7 | select-window -t :=7 |
| Ctrl+b 8 | Select window 8 | select-window -t :=8 |
| Ctrl+b 9 | Select window 9 | select-window -t :=9 |
| Ctrl+b < | Display window menu | display-menu -T … |
| Ctrl+b c | Create a new window | new-window |
| Ctrl+b f | Search for a pane | command-prompt { find-window -Z "%%" } |
| Ctrl+b l | Select the previously current window | last-window |
| Ctrl+b n | Select the next window | next-window |
| Ctrl+b p | Select the previous window | previous-window |
| Ctrl+b w | Choose a window from a list | choose-tree -Zw |
| Ctrl+b Alt+n | Select the next window with an alert | next-window -a |
| Ctrl+b Alt+p | Select the previous window with an alert | previous-window -a |

How this was captured
Captured 2026-10-28 17:54 UTC from a real xterm window running tmux 3.8 on Ubuntu 24.04. Nothing is mocked up. The commands that set up the screen:
tmux new-session -d -s work -n editor -x 110 -y 29
tmux new-window -d -t work -n tests
tmux new-window -d -t work -n logs
tmux new-session -d -s api -n server
tmux send-keys -t work 'clear; echo '"'"'prefix Tab: the 3.8 window switcher'"'"'' Enter
(typed in the terminal) C-b TabWindows are the tabs in the status line. Ctrl+b Tab and Ctrl+b Shift+Tab are new in 3.8; on older versions use Ctrl+b w and Ctrl+b s. Creating, moving and renumbering windows is covered in panes and windows.
Pane shortcuts
Panes & layouts 35
| Keys | Action | Command it runs |
|---|---|---|
| Ctrl+b Space | Select next layout | next-layout |
| Ctrl+b ! | Break pane to a new window | break-pane |
| Ctrl+b " | Split window vertically | split-window |
| Ctrl+b % | Split window horizontally | split-window -h |
| Ctrl+b ; | Move to the previously active pane | last-pane |
| Ctrl+b E | Spread panes out evenly | select-layout -E |
| Ctrl+b M | Clear the marked pane | select-pane -M |
| Ctrl+b m | Toggle the marked pane | select-pane -m |
| Ctrl+b o | Select the next pane | select-pane -t :.+ |
| Ctrl+b q | Display pane numbers | display-panes |
| Ctrl+b x | Kill the active pane | confirm-before -p "kill-pane #P? (y/n)" kill-pane |
| Ctrl+b z | Zoom the active pane | resize-pane -Z |
| Ctrl+b { | Swap the active pane with the pane above | swap-pane -U |
| Ctrl+b } | Swap the active pane with the pane below | swap-pane -D |
| Ctrl+b ↑ | Select the pane above the active pane repeatable | select-pane -U |
| Ctrl+b ↓ | Select the pane below the active pane repeatable | select-pane -D |
| Ctrl+b ← | Select the pane to the left of the active pane repeatable | select-pane -L |
| Ctrl+b → | Select the pane to the right of the active pane repeatable | select-pane -R |
| Ctrl+b Alt+1 | Set the even-horizontal layout | select-layout even-horizontal |
| Ctrl+b Alt+2 | Set the even-vertical layout | select-layout even-vertical |
| Ctrl+b Alt+3 | Set the main-horizontal layout | select-layout main-horizontal |
| Ctrl+b Alt+4 | Set the main-vertical layout | select-layout main-vertical |
| Ctrl+b Alt+5 | Select the tiled layout | select-layout tiled |
| Ctrl+b Alt+6 | Set the main-horizontal-mirrored layout new in 3.5 | select-layout main-horizontal-mirrored |
| Ctrl+b Alt+7 | Set the main-vertical-mirrored layout new in 3.5 | select-layout main-vertical-mirrored |
| Ctrl+b Alt+o | Rotate through the panes in reverse | rotate-window -D |
| Ctrl+b Alt+↑ | Resize the pane up by 5 repeatable | if-shell -F … |
| Ctrl+b Alt+↓ | Resize the pane down by 5 repeatable | resize-pane -D 5 |
| Ctrl+b Alt+← | Resize the pane left by 5 repeatable | if-shell -F … |
| Ctrl+b Alt+→ | Resize the pane right by 5 repeatable | resize-pane -R 5 |
| Ctrl+b Ctrl+o | Rotate through the panes | rotate-window |
| Ctrl+b Ctrl+↑ | Resize the pane up repeatable | if-shell -F … |
| Ctrl+b Ctrl+↓ | Resize the pane down repeatable | resize-pane -D -- |
| Ctrl+b Ctrl+← | Resize the pane left repeatable | if-shell -F … |
| Ctrl+b Ctrl+→ | Resize the pane right repeatable | resize-pane -R -- |
Alt layouts and resizing need your terminal to send Alt (Option on a Mac) as Meta; see the FAQ. Resizing, swapping, joining and synchronized panes are explained in the panes guide. Synchronize panes (typing into every pane of a window at once) has no default shortcut: press Ctrl+b : and run setw synchronize-panes, which toggles it on and off (more on synchronized panes).
Floating pane shortcuts new in 3.7 and 3.8
Floating panes 4
| Keys | Action | Command it runs |
|---|---|---|
| Ctrl+b * | New floating pane new in 3.7 | new-pane |
| Ctrl+b @ | Toggle pane between floating and tiled new in 3.8 | if-shell -F "#{pane_floating_flag}" { join-pane } { break-pane -W } |
| Ctrl+b T | Change the pane title new in 3.8 | command-prompt -I "#T" { select-pane -T "%%" } |
| Ctrl+b g | Move a floating pane new in 3.8 | switch-client -T move |
After Ctrl+b g: move a floating pane
Ctrl+b g switches to the move key table for one key press. These keys only act on a floating pane.
| Then press | Action | Command it runs |
|---|---|---|
| ↑ ↓ ← → | Move to the top, bottom, left or right edge, centered | move-pane -P top-centre … |
| 1 2 3 4 | Move to the top-left, top-right, bottom-left or bottom-right corner | move-pane -P top-left … |
| Alt+↑ and other Alt arrows | Resize to half the window and move to that edge | resize-pane -x "100%" -y "50%" ; move-pane … |
| Alt+1 to Alt+4 | Resize to a quarter of the window, in that corner | resize-pane -x "50%" -y "50%" ; move-pane … |
| 0 | Fill the whole window | resize-pane -x "100%" -y "100%" |
| , . | Menu of positions, or of positions and sizes | display-menu -T Move … |
With the mouse, Ctrl+drag on a pane draws a new floating pane and Alt+drag moves one. Everything else about floating panes, including new-pane and modal panes, is in the floating panes guide.
Copy mode: scroll, search and copy
Copy mode & buffers 7
| Keys | Action | Command it runs |
|---|---|---|
| Ctrl+b # | List all paste buffers | list-buffers |
| Ctrl+b - | Delete the most recent paste buffer | delete-buffer |
| Ctrl+b = | Choose a paste buffer from a list | choose-buffer -Z |
| Ctrl+b > | Display pane menu | display-menu -T … |
| Ctrl+b [ | Enter copy mode | copy-mode |
| Ctrl+b ] | Paste the most recent paste buffer | paste-buffer -p |
| Ctrl+b PgUp | Enter copy mode and scroll up | copy-mode -u |
Inside copy mode the keys are no longer prefixed. tmux has two sets, emacs and vi. It uses emacs keys by default, and switches to vi keys only if your $VISUAL or $EDITOR contains vi (tested on 3.8: EDITOR=vim gives mode-keys vi). To always get vi keys, add set -g mode-keys vi to ~/.tmux.conf.
| Action | vi keys | emacs keys (default) |
|---|---|---|
| Leave copy mode | q | q or Esc |
| Move the cursor | h j k l or arrows | arrows |
| Page up / down | Ctrl+b Ctrl+f | Alt+v Ctrl+v |
| Half a page up / down | Ctrl+u Ctrl+d | Alt+↑ Alt+↓ |
| Top / bottom of the history | g G | Alt+< Alt+> |
| Start / end of the line | 0 $ | Ctrl+a Ctrl+e |
| Next / previous word | w b | Alt+f Alt+b |
| Search down / up | / ? | Ctrl+s Ctrl+r |
| Next / previous match | n N | n N |
| Start a selection | Space | Ctrl+Space |
| Rectangle selection | v | R |
| Select the whole line | V | none |
| Copy the selection and leave | Enter | Alt+w |
| Clear the selection | Esc | Ctrl+g |
| Jump to a line number | : | g |
In vi mode, v toggles a rectangle rather than starting a selection as it does in Vim. If you want Vim's v and y, bind them yourself:
set -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-cancelHow to scroll with the mouse, search the scrollback and copy into the macOS, Windows or Linux clipboard is all on the scroll and copy mode page.
Command prompt, help and display keys
Prompts, help & display 14
| Keys | Action | Command it runs |
|---|---|---|
| Ctrl+b / | Describe key binding | command-prompt -k -p key { list-keys -1N "%%" } |
| Ctrl+b : | Prompt for a command | command-prompt |
| Ctrl+b ? | List key bindings | list-keys -N |
| Ctrl+b C | Customize options | customize-mode -Z |
| Ctrl+b i | Display window information | display-message |
| Ctrl+b r | Redraw the current client | refresh-client |
| Ctrl+b t | Show a clock | clock-mode |
| Ctrl+b ~ | Show messages | show-messages |
| Ctrl+b Delete | Reset so the visible part of the window follows the cursor repeatable | refresh-client -c |
| Ctrl+b Ctrl+b | Send the prefix key | send-prefix |
| Ctrl+b Shift+↑ | Move the visible part of the window up repeatable | refresh-client -U 10 |
| Ctrl+b Shift+↓ | Move the visible part of the window down repeatable | refresh-client -D 10 |
| Ctrl+b Shift+← | Move the visible part of the window left repeatable | refresh-client -L 10 |
| Ctrl+b Shift+→ | Move the visible part of the window right repeatable | refresh-client -R 10 |

How this was captured
Captured 2026-10-28 18:05 UTC from a real xterm window running tmux 3.8 on Ubuntu 24.04. Nothing is mocked up. The commands that set up the screen:
# ~/.tmux.conf for this capture: set-hook -g client-attached 'list-keys -N'
tmux new-session -d -s work -n editor -x 110 -y 29
tmux send-keys -t work clear Enter
tmux attach -t work # the hook opens list-keys -N, the same view as prefix ?Ctrl+b : opens the command prompt at the bottom of the screen. Type any tmux command without the leading tmux, for example kill-session -t old or source ~/.tmux.conf, and press Enter; Tab completes command names. Ctrl+b / waits for one key and tells you what it does. Ctrl+b C opens customize mode, where you can browse and change every option and key binding.
Mouse shortcuts and nested tmux
tmux 3.8 turns the mouse on by default (mouse on). These are the default mouse actions; on older versions they work once you add set -g mouse on.
| Mouse | Action | Command it runs |
|---|---|---|
| Click a pane | Make it the active pane | select-pane -t = |
| Drag a pane border | Resize the panes on either side | resize-pane -M |
| Wheel up on a pane | Enter copy mode and scroll back | copy-mode -e |
| Drag over text | Select, and copy when you let go | copy-mode -M |
| Double / triple click | Copy a word / a whole line | select-word / select-line |
| Middle click | Paste the newest buffer | paste-buffer -p |
| Click a window in the status line | Switch to it (wheel over the status line cycles windows) | switch-client -t = |
| Right click | Pane menu, or window menu on the status line | display-menu … |
| Ctrl+drag | Draw a new floating pane new in 3.8 | new-pane -M |
| Alt+drag a pane | Move the pane | move-pane -M |
To select text with your terminal instead of tmux, hold Shift while you drag in most terminals (xterm, GNOME Terminal and Windows Terminal do this). To send the prefix to a tmux running inside tmux, for example on a server you reached over SSH, press it twice: Ctrl+b Ctrl+b runs send-prefix.
New shortcuts since tmux 3.4
Ubuntu 24.04 ships tmux 3.4 and Debian 13 ships 3.5a, so not every key on this page works everywhere. Run tmux -V to check. These are the default bindings added after 3.4:
| Keys | What it does | Since |
|---|---|---|
| Ctrl+b Alt+6 Ctrl+b Alt+7 | Mirrored main-horizontal and main-vertical layouts (main pane at the bottom or right) | 3.5 |
| Ctrl+b * | New floating pane | 3.7 |
| Ctrl+b @ | Float a tiled pane, or tile a floating one | 3.8 |
| Ctrl+b g | Move or resize a floating pane with the next key | 3.8 |
| Ctrl+b T | Set the pane title | 3.8 |
| Ctrl+b Tab | Window switcher with fuzzy filtering | 3.8 |
| Ctrl+b Shift+Tab | Session switcher with fuzzy filtering | 3.8 |
We compared tmux list-keys -T prefix on tmux 3.4 (85 bindings) and 3.8 (93 bindings); no default binding was removed. Copy mode gained a few keys too, such as r to refresh the view with new output in 3.8. Full release notes are on the releases page.
Change the prefix key
Quick answer
How do I change the tmux prefix to Ctrl+a?
set -g prefix C-a
unbind C-b
bind C-a send-prefixSave the file, then run tmux source ~/.tmux.conf or start a new tmux server.
Ctrl+a is the GNU Screen prefix and the most common choice. The third line lets you press Ctrl+a twice to send a real Ctrl+a to the shell, where it moves to the start of the line. Popular alternatives are C-Space, which clashes with almost nothing, and C-s, which you may need to free with stty -ixon first because many terminals use it to pause output. To keep Ctrl+b working as well, set a second prefix with set -g prefix2 C-b instead of unbinding it.
Whatever you choose, use the switcher at the top of this page so every shortcut here shows your prefix. All other ways to bind and unbind keys are in the config guide, and the config generator writes these lines for you.
Copy to the system clipboard
When you copy in copy mode, tmux keeps the text in its own paste buffer (Ctrl+b ] pastes it) and, with the 3.8 default set-clipboard external, also sends it to your terminal with the OSC 52 escape sequence. Terminals that support OSC 52, such as iTerm2, kitty, WezTerm, Ghostty and Windows Terminal, then put it on your system clipboard, even over SSH. If that does not happen, the clipboard section of the copy mode guide has the fixes for macOS, Wayland, X11 and WSL. Seamless navigation between Vim splits and tmux panes is covered in Neovim and tmux.
tmux cheat sheet PDF
The PDF has every key on this page on two A4 landscape pages in light colors, so it prints well in black and white and fits on US Letter at 97% scale. It is generated from the same tmux 3.8 data as the tables above.
- Page 1: shell one-liners, sessions, windows, floating panes, buffers and every pane key.
- Page 2: copy mode in vi and emacs, prompt and help keys, the Ctrl+b g move keys, mouse actions, how to switch to Ctrl+a, and target syntax.
Download the PDF Open the print layout
"Print this page" prints the tables above without the menus, ads, video and keyboard map, using the prefix you picked. The PDF always shows the default Ctrl+b.
Frequently asked questions
What is the default prefix key in tmux?
The default prefix is Ctrl+b (written C-b in tmux). Press Ctrl and b together, release both, then press the command key. For example Ctrl+b then d detaches. Run tmux show -g prefix to see the prefix your setup uses.
How do I split a pane vertically and horizontally in tmux?
Press Ctrl+b then % to split side by side (left and right), and Ctrl+b then " to split top and bottom. From the shell, the same splits are tmux split-window -h and tmux split-window -v. tmux calls the side-by-side split "horizontal". See the panes guide.
How do I see all tmux shortcuts from inside tmux?
Press Ctrl+b then ?. tmux lists every binding with a short note; press / to search the list and q to close it. From the shell, run tmux list-keys -N, or tmux list-keys for every key table including copy mode.
How do I scroll up in tmux?
Press Ctrl+b then [ to enter copy mode, then use the arrow keys or PgUp and PgDn; press q to go back. Ctrl+b then PgUp enters copy mode and scrolls up in one step. In tmux 3.8 the mouse wheel also works, because the mouse is on by default. More in scroll and copy mode.
Are tmux shortcuts different on a Mac?
No. tmux uses the Ctrl key on macOS too, not Cmd. Shortcuts with Alt (written M-) need your terminal to send Option as Meta: in Terminal, turn on "Use Option as Meta key" in the profile's Keyboard settings; in iTerm2, set the Left Option key to "Esc+" under Profiles, Keys.
Is there a shortcut to kill a tmux session?
Not by default. Press Ctrl+b then s, highlight the session and press x, then y to confirm. You can also run tmux kill-session -t name, or add your own key, such as bind K confirm-before kill-session, to ~/.tmux.conf.
How do I exit tmux?
To leave tmux but keep everything running, detach with Ctrl+b then d; tmux attach brings you back. To close tmux for good, type exit in each pane (the session ends with its last pane) or run tmux kill-server to end every session at once.
Why does my tmux shortcut do nothing?
The most common reasons: you held Ctrl down while pressing the second key (release it first), your config changed the prefix, the binding is newer than your tmux (check tmux -V against the new shortcuts table), or your terminal or OS captures the key first. Troubleshooting covers each case.
Can I download the tmux cheat sheet as a PDF?
Yes. The tmux cheat sheet PDF is two A4 landscape pages with every default binding in tmux 3.8, copy mode keys and the common shell commands. There is also a plain-text version.
Where to go next
Keep learning
Something wrong or out of date on this page? Email hello@tmux.app and we will fix it.