Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a tmux session that several people need to connect to. Some people like the Ctrl+a prefix shortcut and some people prefer the default Ctrl+b shortcut. Is there anything I can put in the .tmux.conf file to allow both shortcuts to work?

It seems that the standard

set -g prefix C-a

command will unset the Ctrl+b shortcut.

I have also tried this:

set -g prefix C-a
set -g prefix C-b

but the second line then unsets the Ctrl+a

share|improve this question
up vote 11 down vote accepted

Issue the command only once, with all the desired prefix keys separated by commas:

set-option -g prefix C-a,C-b
share|improve this answer
Perfect. Thank you! – ltn100 Jan 24 '12 at 14:39
As stated in Dustin Kirkland's answer, this answer is only correct for tmux <= 1.5. His answer is correct for tmux >= 1.6. – Peeja Mar 10 '14 at 15:54

The above answer is correct for tmux 1.5 and earlier

However, this has changed in tmux 1.6. Now, there are two options, prefix, and prefix2, each of which can only be set to a single value, like this:

set-option -g prefix C-a
set-option -g prefix2 C-b
share|improve this answer
If you need to send the secondary prefix key to a window, you can use the -2 option of send-prefix (for the example given in the answer, send-prefix -2 would send C-b to the window). – Tyler Holien Oct 3 '12 at 17:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.