Skip to main content

Understanding Panes

A pane is a rectangular section within a tmux window. Each pane contains a separate pseudo terminal and can run its own program independently. Panes allow you to view and interact with multiple programs simultaneously within a single window.
Panes are numbered starting from 0 in the order they are created. Each pane has a unique pane ID (like %0, %1) that persists for its lifetime.

Splitting Panes

Basic Splitting

The most common way to create panes is by splitting existing ones:
Creates two panes stacked vertically (horizontal split line).

Split-Window Command

More control over splitting:

Creating Panes with Commands

The -d flag creates a pane without switching to it, useful in scripts.

Quick Navigation

Select-Pane Command

Resizing Panes

Interactive Resizing

Resize-Pane Command

Zoom Pane

Temporarily make a pane fill the entire window:
Zoomed panes are marked with a Z flag in the status line. Press C-b z again to unzoom.

Swapping and Moving Panes

Swapping Panes

Exchange two panes:

Rotating Panes

Rotate all panes in the window:

Breaking Panes Out

Turn a pane into its own window:

Joining Panes

Move a pane from one window to another:
Marking panes is useful for moving panes between windows without typing IDs. Mark with C-b m, clear mark with C-b M.

Killing Panes

Interactive Kill

Command Line Kill

Pane Layouts

Preset Layouts

Quickly arrange panes:

Layout Descriptions

Panes spread evenly from left to right across the window.
Panes spread evenly from top to bottom.
Large pane at top, remaining panes spread left to right at bottom. Control main pane height with main-pane-height option.
Large pane on left, remaining panes spread top to bottom on right. Control main pane width with main-pane-width option.
Panes spread evenly in both rows and columns.

Custom Layouts

Pane Synchronization

Send input to multiple panes simultaneously:
When synchronize-panes is on, all input goes to every pane in the window. This only affects panes that are not in any special mode (like copy mode).

Pane Information and Display

Display Panes

List Panes

Pane Format Variables

Useful format variables for panes:

Pane Titles and Borders

Setting Pane Titles

Pane Border Styles

Pane Border Status

Show information in pane borders:

Marking Panes

Mark a pane as the default target for operations:
Only one pane can be marked at a time. Marking a new pane clears the previous mark.

Enabling and Disabling Panes

Control pane input:

Advanced Pane Management

Capture Pane Content

Pipe Pane Output

Redirect pane output to a command:

Respawn Pane

Restart a pane that has exited:

Practical Examples

Development Layout

Monitoring Dashboard

Custom Key Bindings