A deep dive into tmux

One terminal window, many shells — and none of them die when the connection does.
Every shortcut starts with the prefix Ctrl-b: hold Ctrl, press b, release both, then the command key.

Why the work survives

tmux splits the programs from the terminal that displays them. A background server owns your sessions; the terminal is only a client attached to it. Close the client and the server keeps running. Hover any node.

The tmux client–server model A terminal application hosts a tmux client, which connects over a socket to a background tmux server that owns the shells and programs; detaching disconnects the client while the server and its programs keep running. SURVIVES DISCONNECT RUNS SOCKET OWNS DETACH · ATTACH APP Terminal App iTerm2 · Ghostty CLIENT tmux client attached view SERVER tmux server background process PROCS Shells & Programs nvim · npm · tail LEGEND Persistent core Disposable client Your processes Detach / re-attach Survives disconnect
Hover a node to read what it does.

Session, window, pane

Three levels of containment plus two things that hang off them: a pane can switch into copy mode, and the whole server can be driven from outside by a script or an SSH shell. Click any region to filter the command list below.

How tmux nests sessions, windows and panes The tmux server holds sessions, a session holds windows, and a window is split into panes; one pane sits in copy mode reading scrollback, and an outside shell or script drives the whole server through tmux commands. SERVER SESSION · website WINDOW · code PANE Editor nvim . MODE Copy mode Ctrl-b [ · scrollback OUTSIDE Shell / script ssh · send-keys LEGEND Scope ring — outer holds inner Live pane Pane in copy mode Outside tmux
Hover a region to read what it holds. Click it to filter the commands below.

Every command, filtered

Search by key, command, or what you want to do. Click any card to copy it. Shortcuts are written Ctrl-b then the key — never all at once.

The nineteen keys

All prefixed with Ctrl-b. Don't memorise them — the four marked in cyan carry most of the workload. Add the rest when you need them.