What Is tmux?

A terminal multiplexer โ€” one screen, many sessions

Keys: tmux

tmux gives one terminal window many independent sessions, windows, and panes. Detach without losing state. Reattach from anywhere. The standard partner program for Vim.

tmux โ€” short for terminal multiplexer โ€” turns one terminal window into many. A single tmux session can hold any number of windows; each window can be split into any number of panes; panes run independent shells. You attach to a session, do your work, detach, and the session keeps running in the background. Reattach hours or days later from a completely different terminal โ€” sometimes from a completely different computer over SSH โ€” and pick up exactly where you left off.

Start it by typing tmux at any shell. You'll see your shell again, this time with a green status bar across the bottom. Everything you do from now on is happening inside the tmux session. The status bar is the only obvious sign tmux is there.

Concept What it is Mental model
Pane A single shell, drawn inside a rectangle on your screen A window into a process
Window A full-screen layout containing one or more panes Like a virtual desktop, scoped to a session
Session A named collection of windows that can be detached and reattached A workspace that survives terminal closes and SSH disconnects

Watch

See also: The Prefix Key, Panes โ€” Split, Navigate, Resize