Tmux - reload .tmux.conf configuration file
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.
E-Mail hello @itta vern. com
Twitter ITTavernCom
Fediverse ITTavern
Lemmy infosec.pub/c/ittavern
More reading:
- 16.06.2023 Create tmux layouts using bash scripts
- 21.11.2022 Getting started with tmux
- 20.11.2022 Tmux - synchronize the input of all panes within a window
- 22.11.2023 SSH Server Hardening Guide v2
- 12.11.2023 Port Knocking with knockd and Linux - Server Hardening
- 08.11.2023 Getting started with rclone - Data transmission
- 01.11.2023 How to: Cisco ISE backup to SFTP repository with public key authentication
- 24.10.2023 Getting started with dig - DNS troubleshooting