tmux cheat sheet
The keys you use every day, checked against tmux itself. Pick your prefix, search, click a command to copy it.
Sessions
Windows
Panes
Scroll, search and copy
Once you’re in copy mode, keys work without the prefix.
Everything else
Make your tmux.conf
Uses the prefix you picked above.
# ~/.tmux.conf · from usecoral.app/tools/tmux-cheat-sheet # mouse on set -g mouse on # number windows from 1 set -g base-index 1 setw -g pane-base-index 1 set -g renumber-windows on # keep 50,000 lines of scrollback set -g history-limit 50000 # no delay after esc set -s escape-time 10 # vi keys in copy mode setw -g mode-keys vi
Save it as ~/.tmux.conf, then run tmux source-file ~/.tmux.conf or start a new session.
Questions
How do I scroll up in tmux?
Press Ctrl b then [ to enter copy mode, then use the arrow keys or Page Up. Press q to leave. Ctrl b then Page Up jumps in and scrolls a page at once. With set -g mouse on, the scroll wheel works too.
How do I list, attach and kill tmux sessions?
tmux ls lists them. tmux attach -t name attaches, and tmux a attaches to the last one. tmux kill-session -t name ends one, and tmux kill-server ends them all.
How do I split a pane in tmux?
Ctrl b then % splits left and right. Ctrl b then " splits top and bottom. Ctrl b and an arrow key moves between panes, and Ctrl b then x closes one.
How do I change the tmux prefix to Ctrl a?
Add three lines to ~/.tmux.conf: unbind C-b, set -g prefix C-a, and bind C-a send-prefix. Then run tmux source-file ~/.tmux.conf.
Why use tmux with Claude Code or Codex?
A session keeps running when you close the terminal or lose SSH, so a long agent run doesn’t die with your laptop lid. Detach with Ctrl b then d, and attach again later from any terminal.
Every key here is a tmux default, checked against tmux list-keys on tmux 3.8. Copy mode uses vi keys when your $EDITOR or $VISUAL contains vi, or with mode-keys vi; otherwise emacs keys.