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
split-window [-bdefhIPvZ] [-c start-directory] [-e environment] [-F format] 
             [-l size] [-t target-pane] [shell-command [argument ...]]
Create a new pane by splitting the target pane.
-b
flag
Create the new pane to the left of or above the target pane.
-d
flag
Do not make the new pane the active pane.
-e
string
Set an environment variable for the new pane in the form VARIABLE=value. May be specified multiple times.
-f
flag
Create a new pane spanning the full window height (with -h) or width (with -v) instead of splitting the active pane.
-h
flag
Split horizontally, creating a pane to the left or right.
-I
flag
Create an empty pane and forward any output from stdin to it.
-P
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.
-v
flag
Split vertically, creating a pane above or below. This is the default.
-Z
flag
Zoom the active pane if the window is not zoomed, or keep it zoomed if it was zoomed.
-c
string
Specify the working directory for the new pane.
-F
string
Format for output when -P is used.
-l
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%)
-t
string
The target pane to split.
shell-command
string
Shell command to execute in the new pane.

kill-pane

Alias: killp
kill-pane [-a] [-t target-pane]
Destroy the given pane.
-a
flag
Kill all panes except the specified one.
-t
string
The target pane to destroy.

select-pane

Alias: selectp
select-pane [-DdeLlMmRUZ] [-T title] [-t target-pane]
Make a pane the active pane in the window.
-D
flag
Select the pane below the active pane.
-d
flag
Disable input to the pane.
-e
flag
Enable input to the pane.
-L
flag
Select the pane to the left of the active pane.
-l
flag
Select the last (previously active) pane.
-M
flag
Clear the marked pane.
-m
flag
Mark the pane. The marked pane is the default target for -s to join-pane, move-pane, swap-pane, and swap-window.
-R
flag
Select the pane to the right of the active pane.
-U
flag
Select the pane above the active pane.
-Z
flag
Keep the window zoomed if it was zoomed.
-T
string
Set the pane title.
-t
string
The target pane to select.

resize-pane

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

list-panes

Alias: lsp
list-panes [-as] [-r] [-F format] [-f filter] [-O sort-order] [-t target-window]
List panes. By default, lists panes in the current window.
-a
flag
List all panes across all sessions.
-s
flag
List all panes in the session.
-r
flag
Reverse the sort order.
-F
string
Specify the format of each line.
-f
string
Only show panes for which the filter is true.
-O
string
Specify sort order: index, left, top, right, bottom.
-t
string
List panes in the target window.

swap-pane

Alias: swapp
swap-pane [-dDUZ] [-s src-pane] [-t dst-pane]
Swap two panes.
-d
flag
Do not change the active pane.
-D
flag
Swap with the pane below (or the bottom pane if the target is the bottom pane).
-U
flag
Swap with the pane above (or the top pane if the target is the top pane).
-Z
flag
Keep the window zoomed if it was zoomed.
-s
string
The source pane. If not specified, uses the marked pane.
-t
string
The destination pane.

break-pane

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

join-pane

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

display-panes

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

respawn-pane

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

pipe-pane

Alias: pipep
pipe-pane [-IOo] [-t target-pane] [shell-command]
Pipe output sent to a pane to a shell command or vice versa.
-I
flag
Pipe output from stdin to the pane.
-O
flag
Pipe output from the pane to shell-command.
-o
flag
Only open a new pipe if none is currently open.
-t
string
The target pane.
shell-command
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-pane [-aCeJNpPq] [-b buffer-name] [-E end-line] [-S start-line] 
             [-t target-pane]
Capture the contents of a pane.
-a
flag
Use the alternate screen if present.
-C
flag
Escape non-printable characters as octal \ooo.
-e
flag
Include escape sequences for attributes.
-J
flag
Join wrapped lines and preserve trailing whitespace.
-N
flag
Preserve trailing spaces.
-p
flag
Print the captured text to stdout.
-P
flag
Only capture text that is the beginning of an as-yet incomplete line.
-q
flag
Do not output to stdout when -p is used.
-b
string
Name for the paste buffer to store the captured text.
-E
number
End line number. Negative numbers count from the bottom, 0 is the first line of visible pane content.
-S
number
Start line number. Negative numbers count from the bottom, 0 is the first line of visible pane content.
-t
string
The target pane.

select-layout

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