Skip to main content
tmux options control behavior and appearance at different scopes. Options are organized into server, session, window, and pane levels.

Option Commands

set-option

Set an option value:
Aliases: set Flags:
  • -g: Set global option (server-level)
  • -w: Set window option
  • -s: Set server option
  • -p: Set pane option
  • -a: Append to string options (array options)
  • -u: Unset option (revert to default)
  • -F: Expand formats in value
  • -q: Suppress errors
Examples:

show-options

Display option values:
Aliases: show Flags:
  • -g: Show global options
  • -w: Show window options
  • -s: Show server options
  • -A: Show all options (including defaults)
  • -v: Show only the value
  • -H: Show option type and metadata

Option Scopes

From options-table.c:25-32, tmux organizes options by scope:

Server Options

Server options affect the entire tmux server. Set with set -s or set-option -s. Key server options:
From options-table.c:277-554, these are the master server option definitions.

Session Options

Session options affect individual sessions. Set with set -g for global or set -t session: for specific sessions. Key session options:
From options-table.c:556-1054, these are the session option definitions.

Window Options

Window options affect individual windows. Set with set -w or setw. Key window options:
From options-table.c:1056-1550, these are the window option definitions.

Pane Options

Some options can be set at the pane level (per-pane basis):

Option Types

From options-table.c:34-111, tmux options have different types:

String Options

Number Options

Flag Options (Boolean)

Choice Options

Color Options

Style Options

Style options combine multiple attributes:

Array Options

Array options can have multiple values:

Format Variables

Many options support format variables that are expanded at runtime:
Common format variables:
  • #{session_name} - Session name
  • #{window_index} - Window index
  • #{window_name} - Window name
  • #{pane_index} - Pane index
  • #{pane_title} - Pane title
  • #{pane_current_command} - Current command in pane

Command Aliases

From options-table.c:294-306, command aliases allow shorthand for common commands:

Option Inheritance

Options inherit from broader scopes:
  1. Pane options inherit from window options
  2. Window options inherit from session options
  3. Session options inherit from global options
  4. Global options use built-in defaults
You can override at any level:

Viewing Options

Unsetting Options

Revert an option to its default value:

Common Configuration Patterns

Status Line Configuration

Window Status Configuration

Terminal Configuration

Mouse Configuration

Some options only take effect for new sessions, windows, or panes. Changes to default-terminal, for example, only affect newly created sessions.