Where's the default tmux configuration file?
The default configuration is not available as a normal configuration file; it is part of the source code (thus built into the compiled program).
You can examine parts of the configuration with the commands list-keys
and show-options
:
tmux list-keys # show current bindings
tmux show-options -s # show current server options
tmux show-options -g # show current global session options
tmux show-options # show current session options
tmux show-options -gw # show current global window options
tmux show-options -w # show current window options
With tmux 1.7, show-options
can also show you the value of a single option (prior versions can only list all the options from the specified class):
tmux show-options -gw window-status-format
If you are interested in the default configuration that a “pristine” server would have, then you can examine those items like this:
tmux -L unconfigured -f /dev/null start-server \; list-keys \; show-options -s \; show-options -g \; show-options -gw
The -L unconfigured
bit specifies a server socket that you are probably not already using (if you happen to have a server using that socket name, then just pick some other, unused name). The -f /dev/null
makes sure that the server does not use your normal ~/.tmux.conf
configuration file (though, short of a custom build, there is no way to skip the /etc/tmux.conf
system configuration file). The start-server
command is necessary because only certain commands will automatically start a server.
If you are interested in looking at the source code here are the areas of interest:
- the options are defined in
options-table.c
in these arrays:server_options_table
session_options_table
window_options_table
- the bindings start in
key_bindings_init()
inkey-bindings.c
, but some of the details are spread out with the individual command definitions (e.g.cmd_select_window_key_binding()
incmd-select-window.c
).
There should be one in your $HOME/.tmux.conf
specific to your user and a system-wide config file located at /etc/tmux.conf