tmux keyboard shortcuts
tmux's default prefix map controls sessions, windows, panes, copy mode, and terminal layout without leaving a shell. The entries use tmux's default Ctrl-B prefix and preserve the distinction between a prefix chord and the command key that follows it.
macOS, Linux · 59 shortcutsSessions and windows
Create, rename, select, detach, and inspect tmux sessions and windows with the default prefix commands.
| Action | macOS | Linux |
|---|---|---|
| Send the prefix key through to the application | CtrlBthenCtrlB | CtrlBthenCtrlB |
| Rename the current session | CtrlBthen$ | CtrlBthen$ |
| Switch to the previous session | CtrlBthen( | CtrlBthen( |
| Switch to the next session | CtrlBthen) | CtrlBthen) |
| Switch the client back to the last session | CtrlBthenL | CtrlBthenL |
| Select a window by indexUse the corresponding number from 0 through 9. | CtrlBthen0 | CtrlBthen0 |
| Prompt for a window index to select | CtrlBthen' | CtrlBthen' |
| Create a new window | CtrlBthenc | CtrlBthenc |
| Kill the current window | CtrlBthen& | CtrlBthen& |
| Move to the previously selected window | CtrlBthenl | CtrlBthenl |
| Change to the next window | CtrlBthenn | CtrlBthenn |
| Move to the previous window with a bell or activity marker | CtrlBthenAltP | CtrlBthenAltP |
| Move to the next window with a bell or activity marker | CtrlBthenAltN | CtrlBthenAltN |
| Choose the current window interactively | CtrlBthenw | CtrlBthenw |
| Choose a window and session by fuzzy matching | CtrlBthenTab | CtrlBthenTab |
| Rename the current window | CtrlBthen, | CtrlBthen, |
| Prompt for an index to move the current window | CtrlBthen. | CtrlBthen. |
| Display information about the current window | CtrlBtheni | CtrlBtheni |
| Detach the current client | CtrlBthend | CtrlBthend |
| Choose a client to detach | CtrlBthenD | CtrlBthenD |
| Select a new session interactively | CtrlBthens | CtrlBthens |
Panes and layout
Split, select, move, resize, mark, zoom, and rearrange panes in the current tmux window.
| Action | macOS | Linux |
|---|---|---|
| Split the current pane into top and bottom panes | CtrlBthen" | CtrlBthen" |
| Split the current pane into left and right panes | CtrlBthen% | CtrlBthen% |
| Break the current pane out of the window | CtrlBthen! | CtrlBthen! |
| Create a new floating pane | CtrlBthen* | CtrlBthen* |
| Select the next pane | CtrlBtheno | CtrlBtheno |
| Select the pane above | CtrlBthenUp Arrow | CtrlBthenUp Arrow |
| Select the pane below | CtrlBthenDown Arrow | CtrlBthenDown Arrow |
| Select the pane to the left | CtrlBthenLeft Arrow | CtrlBthenLeft Arrow |
| Select the pane to the right | CtrlBthenRight Arrow | CtrlBthenRight Arrow |
| Move to the previously active pane | CtrlBthen; | CtrlBthen; |
| Mark the current pane | CtrlBthenm | CtrlBthenm |
| Clear the marked pane | CtrlBthenM | CtrlBthenM |
| Kill the current pane | CtrlBthenx | CtrlBthenx |
| Toggle the zoom state of the current pane | CtrlBthenz | CtrlBthenz |
| Swap the current pane with the previous pane | CtrlBthen{ | CtrlBthen{ |
| Swap the current pane with the next pane | CtrlBthen} | CtrlBthen} |
| Rotate panes forwards | CtrlBthenCtrlO | CtrlBthenCtrlO |
| Rotate panes backwards | CtrlBthenAltO | CtrlBthenAltO |
| Arrange the window in the next preset layout | CtrlBthenSpace | CtrlBthenSpace |
| Arrange panes using a preset layoutUse Alt+1 through Alt+7 for the seven preset layouts. | CtrlBthenAlt1 | CtrlBthenAlt1 |
| Move a floating pane to a corner or edgeUse g with 1 through 4 or an arrow key for the other positions. Meta also resizes the pane. | CtrlBtheng1 | CtrlBtheng1 |
| Resize the current pane by one cellUse the corresponding arrow direction. | CtrlBthenCtrlUp Arrow | CtrlBthenCtrlUp Arrow |
| Resize the current pane by five cellsUse the corresponding arrow direction. | CtrlBthenAltUp Arrow | CtrlBthenAltUp Arrow |
Copy mode and commands
Enter copy mode, manage paste buffers, search terminal history, open the command prompt, and inspect the active tmux client.
| Action | macOS | Linux |
|---|---|---|
| Enter copy mode | CtrlBthen[ | CtrlBthen[ |
| Paste the most recently copied buffer | CtrlBthen] | CtrlBthen] |
| Choose a paste buffer interactively | CtrlBthen= | CtrlBthen= |
| List all paste buffers | CtrlBthen# | CtrlBthen# |
| Delete the most recently copied buffer | CtrlBthen- | CtrlBthen- |
| Search for text in open windows | CtrlBthenf | CtrlBthenf |
| Open the tmux command prompt | CtrlBthen: | CtrlBthen: |
| List all key bindings | CtrlBthen? | CtrlBthen? |
| Show the time | CtrlBthent | CtrlBthent |
| Show previous tmux messages | CtrlBthen~ | CtrlBthen~ |
| Briefly display pane indexes | CtrlBthenq | CtrlBthenq |
| Force a redraw of the attached client | CtrlBthenr | CtrlBthenr |
| Change the current pane title | CtrlBthenT | CtrlBthenT |
| Suspend the tmux client | CtrlBthenCtrlZ | CtrlBthenCtrlZ |
| Enter copy mode and scroll one page up | CtrlBthenPage Up | CtrlBthenPage Up |