Skip to main content

Overview

Each window displayed by tmux may be split into one or more panes. Each pane takes up a certain area of the display and is a separate terminal. Panes are numbered beginning from zero in the order they are created.

split-window

Alias: splitw
Create a new pane by splitting the target pane.
flag
Create the new pane to the left of or above the target pane.
flag
Do not make the new pane the active pane.
string
Set an environment variable for the new pane in the form VARIABLE=value. May be specified multiple times.
flag
Create a new pane spanning the full window height (with -h) or width (with -v) instead of splitting the active pane.
flag
Split horizontally, creating a pane to the left or right.
flag
Create an empty pane and forward any output from stdin to it.
flag
Print information about the new pane after it has been created. Default format is #{session_name}:#{window_index}.#{pane_index} but can be changed with -F.
flag
Split vertically, creating a pane above or below. This is the default.
flag
Zoom the active pane if the window is not zoomed, or keep it zoomed if it was zoomed.
string
Specify the working directory for the new pane.
string
Format for output when -P is used.
string
Specify the size of the new pane in lines (for vertical split) or columns (for horizontal split). Can be specified as:
  • A number of cells
  • A percentage (e.g., 50%)
string
The target pane to split.
string
Shell command to execute in the new pane.

kill-pane

Alias: killp
Destroy the given pane.
flag
Kill all panes except the specified one.
string
The target pane to destroy.

select-pane

Alias: selectp
Make a pane the active pane in the window.
flag
Select the pane below the active pane.
flag
Disable input to the pane.
flag
Enable input to the pane.
flag
Select the pane to the left of the active pane.
flag
Select the last (previously active) pane.
flag
Clear the marked pane.
flag
Mark the pane. The marked pane is the default target for -s to join-pane, move-pane, swap-pane, and swap-window.
flag
Select the pane to the right of the active pane.
flag
Select the pane above the active pane.
flag
Keep the window zoomed if it was zoomed.
string
Set the pane title.
string
The target pane to select.

resize-pane

Alias: resizep
Resize a pane, up, down, left or right.
flag
Resize downward by adjustment (default 1).
flag
Resize to the left by adjustment.
flag
Begin mouse resizing (only valid if bound to a mouse key binding).
flag
Resize to the right by adjustment.
flag
Trim all lines below the current cursor position and move lines out of the history.
flag
Resize upward by adjustment.
flag
Toggle the zoom state of the pane.
string
The target pane to resize.
string
Set absolute width. Can be a number or a percentage (e.g., 50%).
string
Set absolute height. Can be a number or a percentage.
number
The number of cells to resize by (default 1).

list-panes

Alias: lsp
List panes. By default, lists panes in the current window.
flag
List all panes across all sessions.
flag
List all panes in the session.
flag
Reverse the sort order.
string
Specify the format of each line.
string
Only show panes for which the filter is true.
string
Specify sort order: index, left, top, right, bottom.
string
List panes in the target window.

swap-pane

Alias: swapp
Swap two panes.
flag
Do not change the active pane.
flag
Swap with the pane below (or the bottom pane if the target is the bottom pane).
flag
Swap with the pane above (or the top pane if the target is the top pane).
flag
Keep the window zoomed if it was zoomed.
string
The source pane. If not specified, uses the marked pane.
string
The destination pane.

break-pane

Alias: breakp
Break a pane off from its containing window to make it the only pane in a new window.
flag
Move the window to the next index after dst-window.
flag
Move the window to the next index before dst-window.
flag
Do not make the new window the current window.
flag
Print information about the new window after it has been created.
string
Format for output when -P is used.
string
Name for the new window.
string
The source pane to break out.
string
The destination window position.

join-pane

Alias: joinp, movep
Join a pane to another pane, creating a split. This is the reverse of break-pane.
flag
Join the pane to the left of or above the target pane.
flag
Do not make the joined pane the active pane.
flag
Create a pane spanning the full window height (with -h) or width (with -v).
flag
Join horizontally (create a pane to the left or right).
flag
Join vertically (create a pane above or below). This is the default.
string
Specify the size of the joined pane in lines (for vertical) or columns (for horizontal).
string
The source pane to join. If not specified, uses the marked pane.
string
The destination pane.

display-panes

Alias: displayp
Display a visible indicator of each pane shown by the target client. Panes are numbered beginning from zero in the order they are created.
flag
Do not block other commands from running until the indicator is closed.
flag
Ignore keys pressed.
number
Duration in milliseconds for which the indicator is shown. A duration of 0 means until a key is pressed.
string
The target client.
string
If a key is pressed, template is executed as a command with %% replaced by the pane ID.

respawn-pane

Alias: respawnp
Reactivate a pane where the command has exited.
string
Specify the working directory for the command.
string
Set an environment variable in the form VARIABLE=value. May be specified multiple times.
flag
Kill the existing command if it is still running.
string
The target pane to respawn.
string
Shell command to execute. If not specified, the command used when the pane was created is reused.

pipe-pane

Alias: pipep
Pipe output sent to a pane to a shell command or vice versa.
flag
Pipe output from stdin to the pane.
flag
Pipe output from the pane to shell-command.
flag
Only open a new pipe if none is currently open.
string
The target pane.
string
Shell command to pipe output to or from. If not specified and a pipe is currently open, it is closed.

capture-pane

Alias: capturep
Capture the contents of a pane.
flag
Use the alternate screen if present.
flag
Escape non-printable characters as octal \ooo.
flag
Include escape sequences for attributes.
flag
Join wrapped lines and preserve trailing whitespace.
flag
Preserve trailing spaces.
flag
Print the captured text to stdout.
flag
Only capture text that is the beginning of an as-yet incomplete line.
flag
Do not output to stdout when -p is used.
string
Name for the paste buffer to store the captured text.
number
End line number. Negative numbers count from the bottom, 0 is the first line of visible pane content.
number
Start line number. Negative numbers count from the bottom, 0 is the first line of visible pane content.
string
The target pane.

select-layout

Alias: selectl
Choose a specific layout for a window.
flag
Spread the panes out evenly.
flag
Select the next layout.
flag
Undo the last layout change.
flag
Select the previous layout.
string
The target pane (window will be selected).
string
Layout name: even-horizontal, even-vertical, main-horizontal, main-vertical, tiled, or a custom layout string.