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
Append to a string option. For array options, append to the list.
Expand formats in the option value.
Set a global session or window option. This sets the default for all sessions or windows.
Prevent setting an option that is already set.
Set a pane option. Pane options are inherited from the window options.
Suppress errors about unknown or ambiguous options.
Set a server option.
Unset an option. For inherited options (window or pane), inherit the value from the parent scope.
Unset an option without inheriting (removes the option completely).
Set a window option. This is the default for
set-option (can be omitted).For session options: target session
For window options: target window
For pane options: target pane
The option name.
The value to set. If omitted, the option is unset.
Examples
show-options
Alias:show
Include options inherited from a parent scope.
Show global session or window options.
Include hooks (omitted by default).
Show pane options.
Suppress errors about unknown or ambiguous options.
Show server options.
Show only the option value, not the name.
Show window options. This is the default.
Target pane, window, or session.
The option to show. If omitted, all options are shown.
Examples
set-environment
Alias:setenv
Expand formats in the value.
Set in the global environment. This is the default if no target session is specified.
Mark the variable as removed. It will be removed from the environment when the session is created.
Unset the variable.
Set the variable in the session environment for the target session.
The environment variable name.
The value to set. Required unless
-u is specified.Examples
show-environment
Alias:showenv
Show the global environment. This is the default if no target session is specified.
Output in a format suitable for sourcing in a shell.
Show the session environment for the target session.
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