tmux cheatsheet

· Tech

A quick reference for my tmux setup. My custom bindings plus the essential built-in ones.

P = prefix (Ctrl+Space, or Caps Lock+Space in Ghostty)

Sessions

ActionKeys
New sessiontmux new -s name
New session (from inside tmux)P then :new -s name
New session (shell helper)ts name
Attach to sessiontmux attach -t name
Attach or create (shell helper)ts name
List sessionstmux ls
Session picker (with preview)P then s
Next sessionOption+L
Previous sessionOption+H
Rename sessionP then $
DetachP then d
Kill sessiontmux kill-session -t name

Windows

ActionKeys
Switch to window NOption+N (1-9)
New windowP then c
New named window (shell helper)t name
Next windowP then Ctrl+N
Previous windowP then Ctrl+P
Last window (toggle)P then Ctrl+A
Rename windowP then ,
Close windowP then & (or just exit)
Move windowP then .

Panes (splits)

ActionKeys
Horizontal splitP then \
Vertical splitP then -
Navigate leftP then h
Navigate downP then j
Navigate upP then k
Navigate rightP then l
Close paneP then x
Toggle zoom (fullscreen pane)P then z
Resize paneP then hold arrow keys
Rotate panesP then Ctrl+O

Copy mode

ActionKeys
Enter copy modeP then v
Start selectionv (in copy mode)
Yank (copy)y (in copy mode)
Scroll upCtrl+U (in copy mode)
Scroll downCtrl+D (in copy mode)
Search forward/ (in copy mode)
Search backward? (in copy mode)
Exit copy modeq or Escape

Other

ActionKeys
Lazygit popupP then g
Reload configP then R
Command promptP then :
Show clockP then t
List all key bindingsP then ?