Reloading the tmux config applies new key bindings, status-bar settings, mouse behavior, and other preferences without forcing active shells to restart. That makes it the quickest way to test a configuration change while keeping the current tmux server and its running panes alive.

Tmux reads its configuration when the server starts, usually from ~/.tmux.conf or from an XDG tmux.conf file under $XDG_CONFIG_HOME. Editing the file alone does not change a live tmux environment because the running server keeps its current settings until the file is loaded again with source-file.

The reload command talks to an existing tmux server instead of starting one for you. Most option and key-binding changes take effect immediately after a successful reload, but settings such as default-shell and default-command are only used when tmux creates a new window or pane later.

Steps to reload the tmux config:

  1. Save the tmux change in the configuration file used by the running server.
    $ vi ~/.tmux.conf

    Most setups use ~/.tmux.conf. If the server was started from an XDG config path instead, edit the tmux.conf file under $XDG_CONFIG_HOME or the default ~/.config/tmux directory, then reload that file rather than ~/.tmux.conf.

  2. Reload that file into the running tmux server.
    $ tmux source-file ~/.tmux.conf

    No output means the file was accepted and the new commands were applied to the running server.

    This can be run from any shell while tmux is already running. Inside tmux, open the command prompt with the prefix then : and run source-file ~/.tmux.conf.

    If the command returns error connecting to /tmp/tmux-UID/default (No such file or directory), there is no running tmux server to reload yet.

  3. Query the setting that changed to confirm the reload applied it.
    $ tmux show-options -gv prefix
    C-a

    Replace prefix with the option that changed. For example, use status after changing the status bar or mouse after toggling mouse support.

    Settings such as default-shell and default-command are only used when tmux creates a new window or pane, so open a new pane or window before judging those changes.

  4. Fix the first blocking line and reload again when tmux reports an error.
    $ tmux source-file ~/.tmux.conf
    invalid option: not-a-real-option

    Tmux stops at the first invalid command or option it encounters, so correct that line and rerun the reload before testing the rest of the file.