tmux Tutorial: Sessions, Panes and Persistent Terminal Work

tmux separates terminal work from the client currently attached to it. Sessions contain windows, and panes provide individual terminal contexts within those windows. Detaching a client changes access to that workspace rather than automatically stopping its programs, making resource lifetime distinct from the visible terminal connection.

Here's a popular tmux video — watch it, then summarize it with one click. Or paste any other YouTube link below.

— or paste your own YouTube link —

Want to keep the key points from a YouTube video? Paste the link below to turn it into structured notes.

Why Use tmux Tutorial: Sessions, Panes and Persistent Terminal Work

Frequently Asked Questions

How do sessions, windows and panes relate?

A session groups windows, while a window can contain several panes with their own terminal contexts. Selecting a pane therefore identifies different work from switching to an entirely separate session.

Does detaching a client stop programs in tmux?

Detaching removes that client's current connection to the tmux workspace. Programs can continue within their terminal contexts, so detachment is not equivalent to completing or terminating the work they perform.

Why identify the action's target?

Actions can apply to a particular session, window or pane. Identifying the target prevents changes intended for one task from affecting another workspace that happens to be visible or similarly named.

Can several panes share the same working directory automatically?

Each pane hosts its own process context, whose directory and environment follow its startup arrangement. A directory change in one shell does not automatically change another already running shell's context.

What should be checked before ending a session?

Check whether the programs inside its windows still have required work or unsaved state. Removing the workspace can end those terminal contexts, which differs from merely disconnecting a viewing client.