How to reload tmux configuration?

Quick Answer

To reload your tmux configuration, use tmux source-file ~/.tmux.conf from the command line, or Ctrl+b followed by :source-file ~/.tmux.conf from within tmux.

$ tmux source-file ~/.tmux.conf

Detailed Explanation

After making changes to your tmux configuration file, you need to reload it for the changes to take effect. There are several ways to reload your tmux configuration without restarting tmux or your sessions.

From outside tmux:

  • tmux source-file ~/.tmux.conf - Reload config file
  • tmux source ~/.tmux.conf - Shorter version

From within tmux:

  1. Press Ctrl+b to enter command mode
  2. Type :source-file ~/.tmux.conf and press Enter

Add a keyboard shortcut for reloading:

Add this line to your ~/.tmux.conf file:

bind r source-file ~/.tmux.conf \; display "Config reloaded!"

With this configuration, you can reload your config by pressing Ctrl+b followed by r.

Note on Settings

Some settings, particularly those related to the server or core functionality, may require restarting tmux completely to take effect. Most window, pane, and key binding changes will apply immediately after reloading.

Pro Tip

To verify your configuration has no errors before loading it, run tmux -f ~/.tmux.conf new -d which will attempt to start a detached session with your config and exit with an error if there are any issues.