One terminal, split into panes and grouped into windows — and it all keeps running after you close the lid. Every command below is two beats: press the prefix, let go, press the key.
The loop that matters: tmux a → work → C-b d → walk away → tmux a. Nothing you started ever had to stop.
Every binding lives on one key, and the keys cluster by job. Tap one to see what it does — shifted symbols sit in the corner, tinted by their own job.
Blank keys are yours to bind. The four colours are the four things tmux manages.
The symbols aren't arbitrary — most of them are a picture of the result.
The slash inside % is the divider, standing up.
Both marks hang from the top, like a shelf across the window.
Focus follows the arrow. Nothing moves but you.
Zoom fills the window. The others are hidden, not gone — press it again.
Close the pane you're in. The rest reflow to fill the gap.
The pane leaves and becomes a window of its own.
The braces push the pane one seat earlier or later.
Ctrl nudges by one cell, Alt by five. Keep tapping — the prefix sticks.
Your terminal lets go. The session carries on without you.
C-b Space cycles through them; the numbered keys jump straight there.
tmux Start a session with no name.tmux new -s dev Start a session called dev.tmux new -A -s dev Attach to dev, or create it if it isn't there.The one to make an alias of — it never errors either way.tmux ls List every session and how many windows it has.tmux a Attach to the most recent session.tmux a -t dev Attach to a session by name.tmux a -d -t dev Attach here and kick other clients off.Fixes the squashed layout when an old laptop is still attached.tmux new -d -s build 'make all' Run something in a session without attaching.tmux kill-session -t dev End one session.tmux kill-session -a End every session except the current one.tmux kill-server End all of it, server included.tmux source ~/.tmux.conf Reload your config from outside tmux.Click any command to copy it.
With mouse on you can also click a pane to focus it and drag the borders to resize.
The vi keys here need setw -g mode-keys vi. tmux's buffers are its own — a clipboard tool like pbcopy or xclip is what gets text out to the rest of your machine.
:setw synchronize-panes Type into every pane at once. Run it again to stop.:join-pane -s 3 Pull window 3 in as a pane here.:break-pane Push this pane back out into its own window.:swap-window -t 1 Trade places with window 1.:resize-pane -y 20 Make this pane exactly 20 rows tall.:capture-pane -S -5000 ; save-buffer out.txt Dump 5000 lines of scrollback to a file.:pipe-pane -o 'cat >> pane.log' Keep logging this pane to a file until you run it again.# the prefix your thumb can actually reach set -g prefix C-a unbind C-b bind C-a send-prefix set -g mouse on # click, drag borders, scroll set -g base-index 1 # windows start at 1, like the keyboard setw -g pane-base-index 1 set -g renumber-windows on # no gaps after closing one set -g history-limit 50000 set -sg escape-time 10 # stop Esc lagging in vim setw -g mode-keys vi # splits you can see in the key, opening where you already are bind | split-window -h -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}" unbind '"' unbind % # move between panes like vim (drops prefix-l for last window) bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R # select and yank like vim bind -T copy-mode-vi v send -X begin-selection bind -T copy-mode-vi y send -X copy-selection-and-cancel # reload without leaving bind r source-file ~/.tmux.conf \; display "config reloaded"
Nothing matches . Try split, detach, copy or resize.