tmux/Cheat Sheet
Properties
- tags
- Keyshorts
tmux Cheat Sheet
Prefix key
- Default:
Ctrl+b(gpakosz/.tmux also mapsCtrl+a)
- Default:
Session management
Command Action tmuxStart a new session tmux new -s <name>Start a new session with name tmux lsList all sessions tmux attach/tmux aAttach to the most recent session tmux attach -t <name>Attach to a specific session tmux kill-session -t <name>Terminate a specific session tmux kill-session -aKill all sessions except current tmux kill-serverTerminate all sessions and the server
Window management (within a session)
- default prefix is
ctrl+b(gpakosz/.tmux also mapsCtrl+a) Shortcut (after prefix) Action cCreate a new window ,Rename current window &Kill current window nNext window pPrevious window wList windows 0..9Select window by number $Rename session (interactive)
- default prefix is
Pane management
Shortcut (after prefix) Action %Split pane vertically (there will be a line going from top to bottom with terminals at left and right) "Split pane horizontally (there will be a line going from left to right with terminals above and below) xKill current pane oSwitch to next pane ;Toggle last active pane {/}Move pane left / right zToggle zoom/focus on current pane <Arrow keys>(with prefix+Ctrl)Resize pane in direction
Copy mode & scrolling
- NOTE - tmux intercepts mouse wheel by default
- if you need to pass mouse wheel through to an application like Claude/Code, use one of these two:
- as of 2026-03-13 Fri, my dotfiles automatically are working with tmux and claude code, so this was likely a temporary thing
Shortcut Action [Enter copy mode ]Paste buffer Space(in copy mode)Begin text selection Enter(in copy mode)Copy selection qExit copy mode Movement in copy mode h/j/k/l,w,b,PgUp/PgDnetc.
- NOTE - tmux intercepts mouse wheel by default
Configuration (via
~/.tmux.conf)- Change prefix key:
unbind C-bthenset-option -g prefix C-a - tmux/setw - note, you have to enter the prefix and then colon before entering these commands, e.g.
ctrl+b :then type the words
- Change prefix key:
Quick reference terms