Overview
tmux has numerous options that control its behavior and appearance. Options can be set at different scopes: server (global), session, window, or pane.Option Scopes
- Server (global) options: Apply to the entire tmux server
- Session options: Apply to a specific session
- Window options: Apply to a specific window
- Pane options: Apply to a specific pane
set-option
Alias:set
flag
Append to a string option. For array options, append to the list.
flag
Expand formats in the option value.
flag
Set a global session or window option. This sets the default for all sessions or windows.
flag
Prevent setting an option that is already set.
flag
Set a pane option. Pane options are inherited from the window options.
flag
Suppress errors about unknown or ambiguous options.
flag
Set a server option.
flag
Unset an option. For inherited options (window or pane), inherit the value from the parent scope.
flag
Unset an option without inheriting (removes the option completely).
flag
Set a window option. This is the default for
set-option (can be omitted).string
For session options: target session
For window options: target window
For pane options: target pane
string
required
The option name.
string
The value to set. If omitted, the option is unset.
Examples
show-options
Alias:show
flag
Include options inherited from a parent scope.
flag
Show global session or window options.
flag
Include hooks (omitted by default).
flag
Show pane options.
flag
Suppress errors about unknown or ambiguous options.
flag
Show server options.
flag
Show only the option value, not the name.
flag
Show window options. This is the default.
string
Target pane, window, or session.
string
The option to show. If omitted, all options are shown.
Examples
set-environment
Alias:setenv
flag
Expand formats in the value.
flag
Set in the global environment. This is the default if no target session is specified.
flag
Mark the variable as removed. It will be removed from the environment when the session is created.
flag
Unset the variable.
string
Set the variable in the session environment for the target session.
string
required
The environment variable name.
string
The value to set. Required unless
-u is specified.Examples
show-environment
Alias:showenv
flag
Show the global environment. This is the default if no target session is specified.
flag
Output in a format suitable for sourcing in a shell.
string
Show the session environment for the target session.
string
The environment variable to show. If omitted, all variables are shown.
Examples
Common Options
Server Options
Set withset-option -s, shown with show-options -s:
buffer-limit: Maximum number of automatic paste buffers (default 50)command-alias: List of command aliasesdefault-terminal: Default terminal type (default “screen”)escape-time: Time in milliseconds tmux waits after escape key (default 500)exit-empty: Exit when there are no active sessions (default on)exit-unattached: Exit when no clients are attached (default off)history-file: Path to command history file
Session Options
Set withset-option, shown with show-options:
base-index: Start window numbering at this value (default 0)default-command: Default command for new windowsdefault-shell: Default shell (default $SHELL or /bin/sh)default-size: Default size of windows (default 80x24)display-time: Duration of display-message in milliseconds (default 750)history-limit: Maximum lines per window history (default 2000)key-table: Default key table (default “root”)lock-after-time: Lock session after seconds of inactivity (default 0, disabled)message-style: Style for command prompt messagesprefix: Prefix key (default C-b)renumber-windows: Renumber windows when one is closed (default off)repeat-time: Time for repeating key bindings in milliseconds (default 500)status: Show or hide status bar (default on)status-interval: Update status bar every interval seconds (default 15)status-position: Status bar position: top or bottom (default bottom)status-style: Style for status bar
Window Options
Set withset-option -w, shown with show-options -w:
aggressive-resize: Resize window to smallest or largest client (default on)automatic-rename: Automatically rename windows (default on)automatic-rename-format: Format for automatic window namesclock-mode-colour: Color of clockclock-mode-style: Clock format: 12 or 24 (default 24)mode-keys: Key bindings in copy mode: vi or emacs (default emacs)mode-style: Style for indicators and highlighting in modesmonitor-activity: Monitor for activity in windows (default off)monitor-bell: Monitor for bell in windows (default on)monitor-silence: Monitor for silence (seconds) in windows (default 0, disabled)pane-base-index: Start pane numbering at this value (default 0)remain-on-exit: Keep window after program exits (default off)synchronize-panes: Send input to all panes in the window (default off)window-status-format: Format for window status in status barwindow-status-current-format: Format for current window statuswindow-status-style: Style for window status
Pane Options
Set withset-option -p, shown with show-options -p:
allow-passthrough: Allow passthrough sequences (default off)allow-rename: Allow applications to rename windows (default on)alternate-screen: Use alternate screen feature (default on)remain-on-exit: Keep pane after program exits (default off)window-active-style: Style for active panewindow-style: Style for inactive panes
Option Value Types
Boolean
Values:on, off, yes, no, 1, 0, true, false
Number
Integer valuesString
Text values, may include format variablesStyle
Style specifications:fg=color, bg=color, bold, dim, underscore, blink, reverse, italics, strikethrough, etc.
Array
Comma-separated list of values. Use-a to append.
Color
Color names:black, red, green, yellow, blue, magenta, cyan, white, default
Or: colour0 to colour255, #rrggbb hex values