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 shortcuts

Sessions and windows

Create, rename, select, detach, and inspect tmux sessions and windows with the default prefix commands.

ActionmacOSLinux
Send the prefix key through to the applicationCtrlBthenCtrlBCtrlBthenCtrlB
Rename the current sessionCtrlBthen$CtrlBthen$
Switch to the previous sessionCtrlBthen(CtrlBthen(
Switch to the next sessionCtrlBthen)CtrlBthen)
Switch the client back to the last sessionCtrlBthenLCtrlBthenL
Select a window by indexUse the corresponding number from 0 through 9.CtrlBthen0CtrlBthen0
Prompt for a window index to selectCtrlBthen'CtrlBthen'
Create a new windowCtrlBthencCtrlBthenc
Kill the current windowCtrlBthen&CtrlBthen&
Move to the previously selected windowCtrlBthenlCtrlBthenl
Change to the next windowCtrlBthennCtrlBthenn
Move to the previous window with a bell or activity markerCtrlBthenAltPCtrlBthenAltP
Move to the next window with a bell or activity markerCtrlBthenAltNCtrlBthenAltN
Choose the current window interactivelyCtrlBthenwCtrlBthenw
Choose a window and session by fuzzy matchingCtrlBthenTabCtrlBthenTab
Rename the current windowCtrlBthen,CtrlBthen,
Prompt for an index to move the current windowCtrlBthen.CtrlBthen.
Display information about the current windowCtrlBtheniCtrlBtheni
Detach the current clientCtrlBthendCtrlBthend
Choose a client to detachCtrlBthenDCtrlBthenD
Select a new session interactivelyCtrlBthensCtrlBthens

Panes and layout

Split, select, move, resize, mark, zoom, and rearrange panes in the current tmux window.

ActionmacOSLinux
Split the current pane into top and bottom panesCtrlBthen"CtrlBthen"
Split the current pane into left and right panesCtrlBthen%CtrlBthen%
Break the current pane out of the windowCtrlBthen!CtrlBthen!
Create a new floating paneCtrlBthen*CtrlBthen*
Select the next paneCtrlBthenoCtrlBtheno
Select the pane aboveCtrlBthenUp ArrowCtrlBthenUp Arrow
Select the pane belowCtrlBthenDown ArrowCtrlBthenDown Arrow
Select the pane to the leftCtrlBthenLeft ArrowCtrlBthenLeft Arrow
Select the pane to the rightCtrlBthenRight ArrowCtrlBthenRight Arrow
Move to the previously active paneCtrlBthen;CtrlBthen;
Mark the current paneCtrlBthenmCtrlBthenm
Clear the marked paneCtrlBthenMCtrlBthenM
Kill the current paneCtrlBthenxCtrlBthenx
Toggle the zoom state of the current paneCtrlBthenzCtrlBthenz
Swap the current pane with the previous paneCtrlBthen{CtrlBthen{
Swap the current pane with the next paneCtrlBthen}CtrlBthen}
Rotate panes forwardsCtrlBthenCtrlOCtrlBthenCtrlO
Rotate panes backwardsCtrlBthenAltOCtrlBthenAltO
Arrange the window in the next preset layoutCtrlBthenSpaceCtrlBthenSpace
Arrange panes using a preset layoutUse Alt+1 through Alt+7 for the seven preset layouts.CtrlBthenAlt1CtrlBthenAlt1
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.CtrlBtheng1CtrlBtheng1
Resize the current pane by one cellUse the corresponding arrow direction.CtrlBthenCtrlUp ArrowCtrlBthenCtrlUp Arrow
Resize the current pane by five cellsUse the corresponding arrow direction.CtrlBthenAltUp ArrowCtrlBthenAltUp Arrow

Copy mode and commands

Enter copy mode, manage paste buffers, search terminal history, open the command prompt, and inspect the active tmux client.

ActionmacOSLinux
Enter copy modeCtrlBthen[CtrlBthen[
Paste the most recently copied bufferCtrlBthen]CtrlBthen]
Choose a paste buffer interactivelyCtrlBthen=CtrlBthen=
List all paste buffersCtrlBthen#CtrlBthen#
Delete the most recently copied bufferCtrlBthen-CtrlBthen-
Search for text in open windowsCtrlBthenfCtrlBthenf
Open the tmux command promptCtrlBthen:CtrlBthen:
List all key bindingsCtrlBthen?CtrlBthen?
Show the timeCtrlBthentCtrlBthent
Show previous tmux messagesCtrlBthen~CtrlBthen~
Briefly display pane indexesCtrlBthenqCtrlBthenq
Force a redraw of the attached clientCtrlBthenrCtrlBthenr
Change the current pane titleCtrlBthenTCtrlBthenT
Suspend the tmux clientCtrlBthenCtrlZCtrlBthenCtrlZ
Enter copy mode and scroll one page upCtrlBthenPage UpCtrlBthenPage Up

Make a printable tmux sheet