[tmux.app]
tmux 3.8

[tmux.app] tmux cheat sheet

Press Ctrl+b, let go, then press the key. ↻ = repeatable without the prefix · 3.8 = new in that version

tmux 3.8 · page 1 of 2

From your shell

tmuxStart a new session
tmux new -s workNew session named work
tmux lsList sessions
tmux attachAttach to the last session
tmux attach -t workAttach to work
tmux new -A -s workAttach to work, or create it
tmux rename -t work devRename a session
tmux kill-session -t workKill one session
tmux kill-serverKill every session
tmux source ~/.tmux.confReload your config
tmux list-keys -NList key bindings
tmux -VShow the version

Sessions

dDetach (session keeps running)
sChoose a session from a tree
Shift+TabSession switcher, type to filter 3.8
$Rename the session
()Previous / next session
LLast (previous) session
DChoose a client to detach
Ctrl+zSuspend the client

Windows

cNew window
npNext / previous window
0…9Go to window 0 to 9
lLast (previous) window
'Prompt for a window index
wChoose a window from a tree
TabWindow switcher, type to filter 3.8
fFind a window by text
,Rename the window
.Move the window to an index
&Kill the window (asks first)
Alt+nAlt+pNext / previous window with an alert

Floating panes

*New floating pane 3.7
@Float a tiled pane / tile a floating one 3.8
gMove floating pane, then a key below 3.8
TSet the pane title 3.8

Copy mode & buffers

[Enter copy mode (scroll back)
PgUpCopy mode, one page up
]Paste the newest buffer
=Choose a buffer to paste
#List paste buffers
-Delete the newest buffer

Panes

%Split left / right
"Split top / bottom
↑↓←→Move to the pane in that direction ↻
oNext pane
;Last (previous) pane
qShow pane numbers, then press one
zZoom / unzoom the pane
xKill the pane (asks first)
!Break the pane into a new window
{}Swap with the previous / next pane
Ctrl+oAlt+oRotate panes forward / back
Ctrl+arrowsResize by 1 cell ↻
Alt+arrowsResize by 5 cells ↻
SpaceNext layout
Alt+1…5Even-h, even-v, main-h, main-v, tiled
Alt+6Alt+7Mirrored main-h / main-v layouts 3.5
ESpread panes out evenly
mMMark / clear the marked pane
>Pane menu
Every default binding of tmux 3.8 (tmux list-keys, no config). Older versions lack the ones tagged 3.5 to 3.8.tmux.app/cheat-sheet

[tmux.app] tmux cheat sheet

Copy mode, prompts, help, mouse and your own prefix

tmux 3.8 · page 2 of 2

Copy mode keys

Actionviemacs
Exit copy modeqq Esc
Move the cursorh j k larrows
Page up / downCtrl+b Ctrl+fAlt+v Ctrl+v
Half page up / downCtrl+u Ctrl+dAlt+↑ Alt+↓
Top / bottom of historyg GAlt+< Alt+>
Start / end of line0 $Ctrl+a Ctrl+e
Next / previous wordw bAlt+f Alt+b
Search down / up/ ?Ctrl+s Ctrl+r
Next / previous matchn Nn N
Start selectionSpaceCtrl+Space
Rectangle selectionvR
Select the whole lineV—
Copy and exitEnterAlt+w
Clear selectionEscCtrl+g
Go to line number:g

Help from the shell

tmux list-keys -NEvery binding, with a note
tmux list-keys -T copy-mode-viThe vi copy mode table
tmux list-commandsAll 92 commands
man tmuxThe full manual

Prompt, help & display

:Command prompt
?List every key binding
/Describe one key
CCustomize options and keys
~Show messages
iWindow info in the status line
<Window menu
tBig clock
rRedraw the client
Ctrl+bSend Ctrl+b to the program
Shift+arrowsPan a window bigger than the client ↻
DeleteStop panning, follow the cursor ↻

After prefix g (floating pane)

↑↓←→Move to the top, bottom, left or right edge
1234Move to a corner (TL, TR, BL, BR)
Alt+arrowsHalf the window, at that edge
Alt+1…4A quarter of the window, in that corner
0Fill the whole window
,.Menus: move, or move and resize

Mouse (on by default in 3.8)

Click a paneSelect it
Drag a borderResize panes
Wheel upScroll back (copy mode)
Drag textSelect and copy
Double / triple clickCopy a word / line
Middle clickPaste
Click the status lineSwitch window
Right clickPane or window menu
Ctrl + dragDraw a floating pane

Older than 3.8? Add set -g mouse on. Hold Shift to use your terminal's own selection in most terminals.

Use Ctrl+a as the prefix

set -g prefix C-a
unbind C-b
bind C-a send-prefix

Put it in ~/.tmux.conf, then run tmux source ~/.tmux.conf. Vi keys in copy mode: set -g mode-keys vi.

Targets for -t

worksession
work:2window 2 of work
work:2.1pane 1 of that window
:.+next pane here
$0 @3 %7session, window, pane IDs