tmux Cheat Sheet
Quick reference for tmux — sessions, windows, panes, copy mode, and configuration. Default prefix is Ctrl+b.
All shortcuts below are prefixed with Ctrl+b unless noted otherwise. Example: Prefix c means press Ctrl+b then c.
Sessions
| tmux | Start a new session |
| tmux new -s name | New session with name |
| tmux ls | List all sessions |
| tmux attach -t name | Attach to named session |
| Prefix d | Detach from current session |
| Prefix $ | Rename current session |
| Prefix s | Interactive session list / switcher |
| tmux kill-session -t name | Kill named session |
Windows
| Prefix c | Create new window |
| Prefix , | Rename current window |
| Prefix n / p | Next / previous window |
| Prefix 0-9 | Switch to window by number |
| Prefix w | Interactive window list |
| Prefix & | Kill current window (with confirm) |
| Prefix l | Switch to last (previously active) window |
Panes
| Prefix % | Split pane vertically (side by side) |
| Prefix " | Split pane horizontally (stacked) |
| Prefix arrow keys | Navigate between panes |
| Prefix o | Cycle to next pane |
| Prefix z | Toggle pane zoom (full screen) |
| Prefix x | Kill current pane |
| Prefix Ctrl+arrow | Resize pane in arrow direction |
| Prefix { | Swap pane with previous |
| Prefix } | Swap pane with next |
| Prefix space | Toggle between pane layouts |
Copy Mode
| Prefix [ | Enter copy mode (scroll up) |
| q | Exit copy mode |
| Space | Start selection |
| Enter | Copy selection and exit copy mode |
| Prefix ] | Paste from tmux clipboard |
| /pattern | Search forward in copy mode |
| Page Up / Down | Scroll through history |
Miscellaneous
| Prefix ? | Show all key bindings |
| Prefix : | Open tmux command prompt |
| Prefix t | Show clock in current pane |
| tmux source ~/.tmux.conf | Reload config file |
| set -g prefix Ctrl+a | Change prefix to Ctrl+a (in .tmux.conf) |
| set -g mouse on | Enable mouse support |
| Prefix I | Install plugins (with TPM) |