tmux

tmux is a terminal multiplexer. Its own README states that tmux “enables a number of terminals to be created, accessed, and controlled from a single screen,” and that it “may be detached from a screen and continue running in the background, then later reattached.” It runs on OpenBSD, FreeBSD, NetBSD, Linux, macOS, and Solaris, and the canonical source repository is github.com/tmux/tmux. tmux originated in the OpenBSD project, where it is shipped as a base-system tool, which is why its primary reference is the man.openbsd.org tmux manual page.

The manual defines tmux’s object model precisely. A session is “a single collection of pseudo terminals under the management of tmux.” Each session contains one or more windows, and a window “occupies the entire screen and may be split into rectangular panes,” where each pane “is a separate pseudo terminal.” This three-level hierarchy of sessions, windows, and panes is the conceptual heart of tmux and distinguishes it from earlier multiplexers that exposed only a flat list of windows. Panes can be resized, swapped, and rearranged, and windows can be linked into more than one session at once.

Like GNU Screen before it, tmux provides detach and reattach: because a session is persistent and lives in a server process separate from any client, a user can detach from a session, log out, and reattach later from a different terminal with all programs still running. Multiple clients can even attach to the same session simultaneously, each seeing the same windows, which is useful for pair work and remote assistance.

tmux is built around a clear client-server separation. A tmux server runs in the background and owns all the sessions; each interactive tmux process is a client that connects to that server. Every action a user can take, whether through a key binding or typed at the command prompt, is a tmux command, and the same commands can be issued from an external shell by invoking tmux with the command as arguments. This makes tmux unusually scriptable: entire layouts of sessions, windows, and panes can be constructed and manipulated by shell scripts.

By default tmux uses the prefix key Control-b, after which a second key selects a command such as creating a window, splitting a pane, or detaching. Bindings, options, and the status line are all configurable through a configuration file, conventionally .tmux.conf, parsed as a sequence of tmux commands at startup. Through its combination of a persistent client-server design, a session/window/pane model, and full scriptability, tmux became the dominant terminal multiplexer for development and remote-server work.

Sources

Last verified June 8, 2026