tmux
Every keybinding and command worth knowing. The prefix is Ctrl+b, and every shortcut below that starts with it is pressed as the prefix and then the key.
Everyday
Sessions from the shell8
- Start new session
- Start named session
- List all sessions
- Attach to named session
- Attach or create session
- Kill named session
- Kill all sessions
- Rename session
Sessions6
- Detach from session
- Rename current session
- List / switch sessions
- Previous session
- Next session
- Last (most recent) session
Windows10
- Create new window
- Rename current window
- Kill current window
- List windows (interactive)
- Next window
- Previous window
- Switch to window by number
- Last active window
- Prompt for window index
- Find window by name
Splitting2
- Split horizontally (left | right)
- Split vertically (top / bottom)
Pane navigation6
- Move to pane in direction
- Cycle through panes
- Toggle to last active pane
- Show pane numbers, then press # to jump
- Swap pane left / up
- Swap pane right / down
Pane resizing3
- Resize pane by 1 cell
- Resize pane by 5 cells
- Toggle pane zoom (fullscreen)
Pane layouts6
- Cycle through layouts
- Even horizontal
- Even vertical
- Main horizontal
- Main vertical
- Tiled
Pane management3
- Kill current pane
- Convert pane to window
- Show clock
Copy mode6
- Enter copy mode (scrollback)
- Paste from buffer
- Exit copy mode
- Choose paste buffer
- List all paste buffers
- Delete most recent buffer
Copy mode with vi keys11
- Move cursor
- Move by word forward / back
- Page up / down
- Go to top / bottom
- Search forward
- Search backward
- Next / previous match
- Start selection
- Copy selection and exit
- Toggle rectangle selection
- Yank (copy) selection
Command mode8
- Enter command mode
- Reload config
- Show all key bindings
- Show all commands
- Show info
- Enable mouse
- Vi keys in copy mode
- Start window numbering at 1
Workflows
Scripting7
- Create detached session with named window
- Send keystrokes to target pane
- Add named window to session
- Switch to window 2
- Capture pane output to stdout
- Split pane horizontally in target
- Split pane vertically in target
Configure
Configuration10
- Change prefix to Ctrl+a
- Enable mouse support
- Windows start at 1
- Panes start at 1
- Renumber on close
- Increase scrollback
- Faster key repetition
- Bind | for horizontal split
- Bind - for vertical split
- Bind r to reload config
Troubleshoot
Troubleshooting7
- Check tmux version
- Start without config
- Show all global options
- Show all window options
- Show all key bindings
- Kill everything (nuclear)
- Show key bindings inside tmux