tmux disregarding the configuration file
I just installed tmux on Ubuntu 10.04 and tried to remap the prefix key to C-a
by creating the file ~/.tmux.conf
with these lines:
set-option -g prefix C-a
unbind-key C-b
When starting tmux, both regularly and with -f ~/.tmux.conf
, the prefix is effectively the same default C-b
There are no errors or warnings whatsoever.
Any idea what's wrong with the loading of the conf?
The file ~/.tmux.conf is loaded when the tmux server is first started. So if there are existing tmux sessions, starting a new session with tmux
does not result in reloading the .tmux.conf file. Try restarting tmux server: Use the command tmux list-sessions
to see if there are existing sessions. Exit them (e.g. tmux attach
then kill all windows and exit). Once all sessions are gone, try tmux
again. This time the rebinding should work.
To reload your ~/.tmux.conf without killing your session, you can simply do:
<prefix> :source-file /absolute/path/to/your/.tmux.conf
where <prefix>
is <C-b>
by default.
run inside your tmux session:
tmux source-file /absolute/path/to/your/.tmux.conf
There's also a default keyboard shortcut binding to reload your ~/.tmux.conf
, at least in my installation: C-b r
. If you hit C-b ?
it brings up a list of all bound keyboard shortcuts, so you can see if you have one already defined.
I quit and reopened my terminal and that's the only way I could get it to work again. Not sure why.
using Terminal on Mac OSX