8

I've set options to unbind Ctrl+B and bind tmux on Ctrl+A but Ctrl+A is not working, Ctrl+B still is. I've got my tmux config in the right place, as if I change some other option I can see the result.

unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix

What is wrong? How to make it work?

2 Answers 2

14

This config works for me. You probably haven't restarted your tmux server yet.

From man 1 tmux:

In tmux, a session is displayed on screen by a client and all sessions are managed by a single server. The server and each client are separate processes which communicate through a socket in /tmp.

One method is to terminate everything inside tmux, so tmux ls yields "no server running …". At this moment the next tmux command will start it anew, loading your new config file.

Also read this: Tmux not sourcing my .tmux.conf. According to one of the answers, this should work without the need of restarting the server:

This can also be done from within tmux, by pressing Ctrl+B (prefix key) and then : to bring up a command prompt, and typing:

source-file ~/.tmux.conf
1
  • Yes, thanks. I was trying to reload my console from which i start tmux, but it had no effect. Executig the command above worked for me.
    – Dmitrii
    Jan 21, 2018 at 10:28
0

To expand Kamil Maciorowski's answer, to trigger the new config file, you can terminate your sessions with:

  • terminal command tmux kill-session -a with the -a for all
  • join your existing session with tmux a and using your prefix (CTRL + A or B) to type the command :kill-session.

The general topic here: https://superuser.com/a/1161344/268437

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.