Celeb Glow
general | April 02, 2026

Where is the default tmux.conf file located?

I want to copy the default tmux.conf file to my home directory, but I can't find the location in Ubuntu 12.04. The man page states that the file resides at /etc/tmux.conf however this does not match with my setup.

1

6 Answers

You can use the current (default) settings as a starting point:

tmux show -g | cat > ~/.tmux.conf

Note the pipe to cat is required for now because of a known bug when redirecting tmux stdout to file.

6

As per dpkg -L tmux which shows you what files the package installed, there is no default tmux.conf included in the package. /etc/tmux.conf is just a location that you may use (only makes sense with multiple users using tmux) that will be evaluated before ~/.tmux.conf. You have to create your own .conf file. Have a look at this for example (first hit on google):

1

There is no default /etc/tmux.conf file. You can start with the example conf files in /usr/share/doc/tmux/examples, or look at the manual/web/etc. to come up with your own configuration file.

The examples directory contains:

/usr/share/doc/tmux/examples/n-marriott.conf
/usr/share/doc/tmux/examples/t-williams.conf
/usr/share/doc/tmux/examples/vim-keys.conf
/usr/share/doc/tmux/examples/h-boetes.conf
/usr/share/doc/tmux/examples/screen-keys.conf

The top answer's tmux show -g | cat > ~/.tmux.conf did not work for me since I got a bunch of unknown command errors.

Upon further digging it has to do with the syntax change so tmux show -g no longer generates valid config files. You must prepend every line with set -g in order for this to work or run:

tmux show -g | sed 's/^/set -g /' > ~/.tmux.conf

Even the command in this answer leaves syntax error in conf file.

/users/kube/.tmux.conf:35: bad key: none

I suggest below command:

tmux show -g | sed -e 's/^/set -g /' -e 's/prefix2 none/prefix2 C-a/g' > ~/.tmux.conf

This solves two problems

  1. The syntax issue.
  2. It allows to use extra bind-key Controla which is easy to type than Control+b

The config file is located in /usr/share/tmux, not in /usr/share/doc/tmux.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy