tmux · sessions · panes · copy mode · local

tmux cheatsheet

Searchable reference of 51 tmux commands across sessions, windows, panes, and copy mode. Default prefix is Ctrl-b.

tmux Cheatsheet
51 matches
Visible
51
all
Total
51
commands
Prefix
Ctrl-b
default
Sections
5
groups
Prefix is Ctrl-b — press, release, then the next key.
commands
Sessions
Windows
Panes
Copy mode & scrolling
Customisation & misc
descriptions
Sessions
Start a new unnamed session
Start named session
tmux new -s dev
List existing sessions
Attach to session
Kill a session
Kill all sessions and tmux server
Detach from current session
Show interactive session picker
Rename current session
Switch to previous session
Switch to next session
Windows
Create new window
Rename current window
Kill current window
Next window
Previous window
Last-used window (toggle)
Switch to window by index
Window picker (interactive list)
Find window by name
Move/renumber window
Panes
Split pane vertically (left/right)
Split pane horizontally (top/bottom)
Navigate between panes
Cycle through panes
Show pane numbers
Kill current pane
Toggle pane zoom (fullscreen)
Swap pane with previous
Swap pane with next
Break pane into new window
Resize pane by 1 cell
Resize pane by 5 cells
Cycle pane layouts
Copy mode & scrolling
Enter copy mode
Paste last buffer
Exit copy mode (inside copy mode)
Begin selection (copy mode)
Copy selection to buffer (copy mode)
Search forward in copy mode
Search backward in copy mode
Choose buffer to paste
List all buffers
Customisation & misc
Main config file
Reload config without restart
Show all keybindings
Show big clock in current pane
Enter command prompt
Enable mouse support (in config)
Use vi keys in copy mode
Change prefix to Ctrl-a (popular)
Quick Start

Master the tmux prefix

Every tmux command starts with the prefix key (default ^B). Press the prefix, release, then the action key. Customize the prefix in ~/.tmux.conf.

  1. 01

    Press prefix

    Default is Ctrl-B. Release before the next key.

    Inputs are treated as UTF-8 throughout the pipeline and validated client-side as you type — nothing dispatches until the value is well-formed.

    prefixinpututf-8client-sidevalidated
    prefix · textCtrl-b · set
    Ctrl-b
    loaded · parsedclient-side
  2. 02

    Pick action

    Sessions, windows, panes, copy mode.

    Each toggle re-computes through a memoised hook, so flipping options never resets your input and the UI stays snappy on large inputs.

    actionoptionslivememoisedtoggles
    action · memoisedc · live
    new window
    options set · memoisedlive
  3. 03

    Read description

    Right panel: what it does + example syntax.

    Randomness — where used — comes from crypto.getRandomValues, never Math.random. Heavy work sits in useMemo.

    readcomputeinstantlocaldeterministic
    desc · instantwhat · computed
    split horizontally
    computed · instantinstant
  4. 04

    Copy

    Click any command to copy.

    Copy writes through navigator.clipboard and downloads use a Blob — zero network traffic. Same input plus same options always yield the same bytes.

    copydownloadzero-networkreproducible
    ok · copiedready · copied
    Copied
    shipped · ready to shipsuccess
Pro tips

Pro tips for everyday utilities

Reach for crypto.getRandomValues

Cryptographically random for IDs, tokens, salts. Math.random is for animation and games, not security.

Sort IDs lexicographically

UUID v4 has no time ordering. Use ULID or UUID v7 if you need sorted IDs.

Mock data with seeds

Faker-style libraries can be seeded so tests are reproducible. Embed the seed in the fixture file.

Reference cards beat memory

Cheatsheets for Vim, Git, Docker, Linux signals are faster than man pages when you’re mid-flow.

Browser APIs vary

Touch events, gamepads, and clipboard differ across vendors. Feature-detect before use.

Persist in the right place

localStorage for user preferences, sessionStorage for transient state, IndexedDB for structured data.

Use Cases

When to consult tmux docs

Remote sessions, multi-pane workflows.

SSH sessions

Survive disconnects with detached sessions. Random values come from crypto.getRandomValues — cryptographically secure for tokens, salts, and session IDs. Math.random is deterministic enough for animations but predictable enough to be a security bug.

CSPRNG-backed

Multi-pane work

Logs, editor, REPL side by side. Pair with hashids, ULID, or UUID v7 when you need both random and sortable — useful for primary keys, public-facing IDs, and event log ordering without a sequence column.

reproducible

Pair programming

Attach to a shared session. Output is deterministic given the same seed, so fixtures and tests stay reproducible across CI runs and contributor machines. Embed the seed in the fixture file for full replay.

snappy

Long builds

Detach and reattach across SSH. Heavy work runs through useMemo so the UI stays snappy on large inputs. Same input + same options yields identical bytes — the kind of stability snapshot tests rely on.

feature-detected

Learning curve

Speed up muscle memory with a cheatsheet. Storage tools persist to the right backend: localStorage for user preferences, sessionStorage for transient state, IndexedDB for structured data. Pick the right shelf and quota worries disappear.

deterministic

Config tuning

Look up scriptable commands for .tmux.conf. Browser feature detection: clipboard, fullscreen, gamepad, and Web Bluetooth APIs gracefully fall back when unavailable. No surprise white screens on Safari or older Firefox.

production-ready
FAQ

Frequently asked questions

Yes — bind another key in ~/.tmux.conf with set -g prefix C-a; many users prefer C-a.
tmux is the modern successor with more features and a cleaner config.
Yes with reattach-to-user-namespace on macOS, or set-option clipboard external on Linux.
Yes — tmux send-keys, new-session, split-window, etc. all scriptable.
Yes — bundled in JS. Nothing is sent to a server.
Suggest a tool

Something missing?

Tell us what you need. We ship the top requests every two weeks.

Sent straight to the maintainers · no account needed
47 in queue·8 shipped this month
Request queued. Thanks!