Sessions

tmux
Start a new session with a default name.
tmux new -s <name>
Start a new named session.
tmux new -A -s <name>
Attach to session or create it if missing.
tmux ls
List sessions.
tmux attach -t <name>
Attach to a session.
tmux rename-session -t <name> <new>
Rename a session from the CLI.
C-b $
Rename current session.
C-b s
List sessions and switch interactively.
C-b ( / C-b )
Previous / next session.
C-b d
Detach from current session.
tmux kill-session -t <name>
Kill a session.
tmux kill-server
Stop all tmux sessions.

Windows

C-b c
Create a new window.
C-b ,
Rename current window.
C-b p / C-b n
Previous / next window.
C-b l
Jump to last active window.
C-b <number>
Jump to window number.
C-b w
List windows and select one interactively.
C-b .
Move current window to a new index.
C-b &
Close current window.

Panes

C-b %
Split vertically.
C-b "
Split horizontally.
C-b ←/↑/→/↓
Move between panes with arrow keys.
C-b o
Cycle through panes.
C-b q
Show pane numbers briefly.
C-b { / C-b }
Swap current pane with previous / next.
C-b x
Close current pane.
C-b z
Toggle zoom for current pane.
C-b :resize-pane -L/R/U/D <n>
Resize panes via command prompt.

Layouts

C-b Space
Cycle through preset layouts.
C-b :select-layout even-horizontal
Split panes into equal horizontal rows.
C-b :select-layout even-vertical
Split panes into equal vertical columns.
C-b :select-layout main-vertical
Large main pane on the left with side panes.

Copy Mode and Scrollback

C-b [
Enter copy mode (scrollback).
PgUp/PgDn
Scroll up / down in copy mode.
Space
Start selection in copy mode.
Enter
Copy selection to buffer and exit copy mode.
q
Exit copy mode without copying.
C-b ]
Paste last copied buffer.

Buffers

C-b =
Choose a buffer to paste.
C-b :list-buffers
Show all buffers with sizes.
C-b :save-buffer <file>
Save the latest buffer to a file.
C-b :delete-buffer -b <n>
Delete a specific buffer.

Options and Config

~/.tmux.conf
Main configuration file.
set -g mouse on
Enable mouse support for pane selection and scroll.
set -g history-limit 50000
Increase scrollback buffer size.
tmux source-file ~/.tmux.conf
Reload config without restarting tmux.

Misc Essentials

C-b :
Open tmux command prompt.
C-b ?
Show key bindings help.
C-b t
Show a big clock (handy for breaks).