Is it possible to change the tmux prefix keyboard shortcut ctrl+B to alt+B?


Yes. See for example this link:

set-option -g prefix M-b
  • There is only described configuration for ctrl+A which (strangely) doesn't work for me. But I'd like to use rather alt instead of control – xralf May 11 '12 at 19:03
  • 4
    Change "c" to "m" (see the man page). – Lars Kotthoff May 11 '12 at 21:57
  • 15
    Please do not answer with just a link. Your post must stand on its own. Include the relevant information in your post, keep the link for reference. – Gilles 'SO- stop being evil' May 12 '12 at 2:50
  • 1
    The link you provided does not work – St.Antario Sep 23 '16 at 17:49
  • 1
    Works fine for me. – Lars Kotthoff Sep 23 '16 at 23:35

Just extracted the link answered by @Lars Kotthof

Changing tmux prefix to Alt+b:

set-option -g prefix M-b

As other have noted, you can do this by describing your favorite control sequence in e.g. the ~/.tmux.conf config file.

set-option -g prefix M-b

You can also execute this from within tmux by using the command-prompt command, ie. the current prefix and the : character, to run the set-option command interactively. I.e., type Ctrl-b then these characters, as is:

:set-option -g prefix M-b

followed by the Enter key

Your Answer

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

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