Tmux - reload .tmux.conf configuration file

CaffeineFueled

2022/12/03

Restarting the tmux server every time you change the configuration is tedious and unnecessary.

From the shell:
tmux source-file ~/.tmux.conf
As a tmux command:
Prefix + :source-file ~/.tmux.conf
Just in case: the default prefix is CTRL + b

Those methods reload the tmux configuration without affection the sessions or windows.

Info: some changes still require a restart of the tmux server. If you were to remove a key bind, you would need to restart the tmux server or explicitly unbind the key.

The server stops running if all sessions are closed or you kill it with tmux kill-server or kill the process with pkill/kill. tmux kill-server will send a SIGTERM, where tmux kill-pane/kill-window/kill-session will send a SIGHUP.

Side note to the location of the configuration file:

Tmux looks in /etc/tmux.conf for a system-wide configuration file, and then for a configuration file in the current user’s home directory, e.x. ~/.tmux.conf. If these files don’t exist, tmux uses the default settings.




Most recent Articles:
  • Dummy IP & MAC Addresses for Documentation & Sanitization
  • Deploying ISSO Commenting System for Static Content using Docker
  • Generate a Vanity v3 Hidden Service Onion Address with mkp224o
  • ssh-audit Primer - Audit your SSH Server
  • mtr - More Detailed Traceroute - Network Troubleshooting