Skip to main content

Overview

Windows are the primary containers within a tmux session. Each session has one or more windows, and windows may be linked to multiple sessions. Windows are made up of one or more panes.

new-window

Alias: neww
Create a new window.
flag
Insert the new window at the next index after the specified target-window, moving windows up if necessary.
flag
Insert the new window at the next index before the specified target-window.
flag
Do not make the new window the current window.
flag
If the target window exists, destroy it before creating the new window.
flag
Print information about the new window after it has been created. Default format is #{session_name}:#{window_index} but can be changed with -F.
flag
Set synchronized-panes on for the new window.
string
Specify the working directory for the new window.
string
Set an environment variable for the new window in the form VARIABLE=value. May be specified multiple times.
string
Format for output when -P is used.
string
Name for the new window.
string
The target window position. If it doesn’t exist, the new window is created at the next free index.
string
Shell command to execute in the new window. If not specified, the default command is used.

kill-window

Alias: killw
Destroy the given window.
flag
Kill all windows except the specified one.
string
The target window to destroy.

select-window

Alias: selectw
Select a window. Makes the window the current window in the session.
flag
Select the last (previously selected) window.
flag
Select the next window.
flag
Select the previous window.
flag
If the window is already the current window, select the last window.
string
The target window to select.

list-windows

Alias: lsw
List windows. By default, lists windows in the current session.
flag
List all windows across all sessions.
flag
Reverse the sort order.
string
Specify the format of each line.
string
Only show windows for which the filter is true.
string
Specify sort order: index, name, creation (time), or activity (time).
string
List windows in the target session.

rename-window

Alias: renamew
Rename the window to new-name.
string
The target window to rename.
string
required
The new name for the window.

move-window

Alias: movew
Move or link a window to another location.
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 moved window the current window.
flag
If dst-window exists, destroy it before moving or linking.
flag
Renumber windows in the session in sequential order.
string
The source window to move.
string
The destination window position.
Alias: linkw
Link a window from one session into another. Links create a window that appears in multiple sessions.
flag
Link the window at the next index after dst-window.
flag
Link the window at the next index before dst-window.
flag
Do not make the linked window the current window.
flag
If dst-window exists, destroy it before linking.
string
The source window to link.
string
The destination window position.
Alias: unlinkw
Unlink a window from the current session. If the window is only linked to one session, it is destroyed.
flag
Kill the window if it is only present in one session.
string
The target window to unlink.

swap-window

Alias: swapw
Swap two windows.
flag
Do not make the swapped window the current window.
string
The source window.
string
The destination window.

rotate-window

Alias: rotatew
Rotate the panes in the window. All panes are moved around one position.
flag
Rotate downward (the last pane becomes the first).
flag
Rotate upward (the first pane becomes the last).
flag
Keep the window zoomed if it was zoomed.
string
The target window.

respawn-window

Alias: respawnw
Reactivate a window 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 window to respawn.
string
Shell command to execute. If not specified, the command used when the window was created is reused.

find-window

Alias: findw
Search for windows with names, titles, or visible content matching match-string.
flag
Ignore case when matching.
flag
Match only visible window contents.
flag
Match only window names.
flag
Match match-string as a regular expression.
flag
Match only window titles.
flag
Zoom the pane.
string
The target pane for displaying results.
string
required
The string or pattern to search for.

last-window

Alias: last
Select the last (previously selected) window.
string
The target session.

next-window

Alias: next
Select the next window in the session.
flag
Move to the next window with an alert (bell, activity, or silence).
string
The target session.

previous-window

Alias: prev
Select the previous window in the session.
flag
Move to the previous window with an alert.
string
The target session.