Table of contents
Open Table of contents
The man page is the problem
I bounced off tmux twice: open the man page, see 4,000 lines, copy a 200-line config, use none of it, quit. tmux isn’t hard — it’s badly introduced. The part you actually need is tiny, and nobody draws the line. So here it is: one idea, four commands, six keys.
The one idea worth it
Your session survives you walking away. Close the window, drop SSH, shut the laptop — the processes inside keep running. detach is not quit. Splitting panes is the garnish everyone quits over; persistence is the meal.
Four commands you type
In your shell, not inside tmux — list, new, attach:
alias tl='tmux ls' # what's running?
alias tn='tmux new -s' # tn work
alias tt='tmux attach -t ' # tt work
Always name sessions (-s work). Unnamed ones become 0, 1, 2, and you’ve lost track by Tuesday.
Six keys you press
Everything starts with the prefix Ctrl-b, then a letter:
C-b d detach (the one that matters)
C-b | / - split left-right / top-bottom
C-b hjkl move between panes
C-b c new window
C-b n / p next / prev window
Two lines make the splits memorable; one turns on the mouse:
bind | split-window -h
bind - split-window -v
set -g mouse on
What to ignore
Copy mode, custom status bars, layouts, scripting, tmuxinator (mux) — all real, none needed on day one. Don’t learn a feature until its absence annoys you.
The payoff I didn’t see coming
Once your work lives in named panes, a coding agent reads them too — no copy-paste:
tmux capture-pane -p -t work:server.0 # any pane, any session
tmux send-keys -t work:server.0 'pytest -x' Enter
“Read the backend error” becomes one command the agent runs itself. Two agents in two sessions can even see each other: capture-pane to read, send-keys to reply — tmux as an accidental message bus. (It grabs whatever’s on screen, secrets included, so point it at the pane that matters.)
Still 4,000 lines
You’ll read the rest eventually, or you won’t. Doesn’t matter. The ten things are the whole gap between the tmux you quit and the tmux you live in — and the persistence under them now has two kinds of reader: you, and your agents.