Skip to main content
Back to Commands
MiscellaneousPrefix + : (then type command)

set-option

Short form: set

Set a session, window, or server option. Without -g, the option is set for the current session.

Synopsis

bash
tmux set-option [-aFgopqsuUw] [-t target-pane] option [value]

Options

FlagDescription
-gSet global option (affects all sessions/windows)
-aAppend to string option
-uUnset option
-wSet window option (same as setw)
-sSet server option

Examples

Enable mouse globally

bash
tmux set -g mouse on

Change prefix to Ctrl+a

bash
tmux set -g prefix C-a

Start window numbering at 1

bash
tmux set -g base-index 1

Increase scrollback buffer

bash
tmux set -g history-limit 10000

Default Keybinding

Prefix + : (then type command)

Default prefix is Ctrl+b

Pro Tips

  • Use -g for options that should apply to all sessions
  • Put these in your .tmux.conf for persistence