Tmux Keybindings

Cheat sheet for tmux, a terminal multiplexer.

Starting tmux

Start new session:

tmux new -s \<session name>

Attach a session

tmux attach -t \<session name>

List sessions

tmux ls

Emacs Style - Standard

Keys

Prefix key

Ctrl + b

Modifier Keys

Keyequal to
Ccontrol
Mmeta (normally alt)
Sshift

Can be combined

Keycombofunctioncommand
C-b ?help / list of all functionshelp
C-b :opens command prompt
C-b ccreate new windownew
C-b %split pane horizontalsplit-window -h
C-b "split pane verticalsplit-window -v
C-b <Number>switches to window n 0-9select-window <Number>
C-b 'prompts for window index
C-b nchanges to next window
C-b pchanges to previous window
C-b lchanges to last window
C-b Upchange to pane above
C-b Downchange to pane down
C-b Leftchange to pane left
C-b Rightchange to pane right
C-b qinteractively switch panedisplay-panes / select-pane <Number>
C-b omoves to next pane by index
C-b C-oswaps next pane by index with current one
C-b slists active sessions (tree mode)choose-tree
C-b wlists active session and contained windows
Up Down Left Rightmove through list
xkill selected items
Xkill tagged items
< >scroll preview
C-ssearch by name
nrepeat last search
ttag / untag item
Tuntag all
Otag all
rreverse sort
vtoggle preview
qexit tree mode
C-b S-dclient mode
Enter / ddetach client
Ddetach tagged clients
xdetach client and kill shell it was started in
Xsame as above for tagged
C-b &kill current windowkill-window
C-b xkill active panekill-pane
kill sessionkill-session
C-b $rename sessionrename-session
C-b ,rename current windowrename-window
C-b mmark pane for swapping
C-b Munmark all panes
swap paneswap-pane
swap windowswap-window
C-b {swap pane above
C-b }swap pane below
C-b .move window to indexmove-window
C-b C-Left Right Up Downresize pane in small steps
C-b M-Left Right Up Downresize pane in big steps
C-b Ztemporary fullscreen of pane
C-b [enter copy mode
C-Spacestart selection
C-wcopy selection and quit
qquit copy mode
C-b ]enter paste mode
Enter / ppaste buffer P
Ppaste tagged buffers
ddelete selected buffer
Ddelete tagged buffers
C-b fenters tree mode and looks for text
Last modified 2021.01.01