Skip to content

tmux Cheat Sheet

Every keybinding and command from the tutorial, organised for fast lookup. Bookmark this page.

The prefix key is Ctrl+a — the iSu dev server standard. All “in tmux” keystrokes mean: press Ctrl+a, release, then press the next key.


CommandAction
tmux new -s NAMECreate session named NAME and attach
tmux lsList all running sessions
tmux attach -t NAMEReattach to session NAME
tmux kill-session -t NAMEDestroy session NAME
tmux kill-serverDestroy every tmux session (heavy hand)
tmux -CC new -s NAMEiTerm2 control mode: native iTerm2 windows reflect tmux state
echo $TMUXInside tmux: prints socket path. Outside: blank.

KeystrokeAction
Ctrl+a dDetach from current session
Ctrl+a $Rename current session
Ctrl+a sInteractive session picker (tree view)
Ctrl+a wWindow picker across all sessions
Ctrl+a LToggle to last session
Ctrl+a (Switch to previous session (alphabetic)
Ctrl+a )Switch to next session (alphabetic)

KeystrokeAction
Ctrl+a cCreate new window
Ctrl+a ,Rename current window
Ctrl+a nNext window
Ctrl+a pPrevious window
Ctrl+a 09Jump to window by number
Ctrl+a wInteractive window picker
Ctrl+a &Kill current window (confirms)
Ctrl+a !Promote current pane to its own window

KeystrokeAction
Ctrl+a %Split vertically (left/right) — default binding
Ctrl+a "Split horizontally (top/bottom) — default binding
Ctrl+a |Split vertically — recommended config (memorable)
Ctrl+a -Split horizontally — recommended config (memorable)
KeystrokeAction
Ctrl+a ←/→/↑/↓Move focus to pane in that direction
Ctrl+a h/j/k/lSame, vim-style — recommended config
Ctrl+a qFlash pane numbers (press number to jump)
Ctrl+a oCycle to next pane
Ctrl+a ;Toggle to last active pane
KeystrokeAction
Ctrl+a zZoom toggle — current pane fills window
Ctrl+a xKill current pane (confirms)
Ctrl+a {Swap with previous pane
Ctrl+a }Swap with next pane
Ctrl+a SpaceCycle through built-in layouts
KeystrokeAction
Ctrl+a Alt+arrowResize by 5 cells in that direction
Ctrl+a Ctrl+arrowResize by 1 cell (fine adjustment)
Ctrl+a H/J/K/LResize by 5, vim-style, repeatable — recommended config

KeystrokeAction
Ctrl+a [Enter copy mode
Ctrl+a ]Paste most recently copied buffer
arrow keys / h j k lMove cursor (vi-mode-keys)
Page Up / Page DownScroll a page
Ctrl+u / Ctrl+dScroll half a page
g / GJump to top / bottom
/Search forward
?Search backward
n / NNext / previous match
vBegin selection — recommended config
yCopy selection and exit — recommended config
q or EscExit copy mode without copying

KeystrokeAction
Ctrl+a :Open tmux command prompt (run a tmux command interactively)
Ctrl+a rReload ~/.tmux.conf — recommended config
Ctrl+a ?Show all current key bindings
Ctrl+a tShow a clock in the current pane

📚 Built-in layouts (cycle with Ctrl+a Space)

Section titled “📚 Built-in layouts (cycle with Ctrl+a Space)”
LayoutShape
even-horizontalEqual-width columns
even-verticalEqual-height rows
main-horizontalOne big pane on top, equal panes below
main-verticalOne big pane on the left, equal panes on the right
tiledEven grid

main-vertical is the IDE feel.


session:window.pane

Examples:

TargetMeans
nafbiThe session itself
nafbi:devWindow dev in session nafbi
nafbi:dev.1Pane 1 of window dev in session nafbi
nafbi:2Window 2 (by index) in session nafbi

Terminal window
tmux has-session -t NAME 2>/dev/null # Exit 0 if session exists, 1 otherwise
tmux new-session -d -s NAME -n WIN -c DIR
tmux new-window -t SESSION -n NAME -c DIR
tmux split-window -h -t TARGET -c DIR # -h horizontal, -v vertical
tmux send-keys -t TARGET "command" C-m # C-m is Enter
tmux select-pane -t TARGET
tmux select-window -t TARGET
tmux rename-session -t OLD NEW
tmux rename-window -t SESSION:OLD NEW
tmux list-sessions
tmux list-windows -t SESSION
tmux list-panes -t SESSION:WINDOW

Terminal window
alias tls='tmux ls'
alias ta='tmux attach -t'
alias tn='tmux new -s'
alias tk='tmux kill-session -t'
alias tclaude='tmux attach -t claude || tmux new -s claude'
alias twork='NO_AUTO_TMUX=1 tmux new -s work-$(date +%H%M)'

KeystrokeAction
Ctrl+a IInstall plugins listed in ~/.tmux.conf
Ctrl+a UUpdate plugins
Ctrl+a alt+uUninstall plugins removed from config
Ctrl+a Ctrl+sSave sessions (tmux-resurrect)
Ctrl+a Ctrl+rRestore sessions (tmux-resurrect)