Ubuntu: How to change tmux’s ctrl+b binding to ctrl+a

 

If you’re used to screen you’ll be in the habit of using ctrl+a, for example detaching a session with ctrl+a then d – if you make the move to tmux it’s ctrl+b then d, which can take some getting used to. Often it’s easier to make tmux get used to you! To change tmux from ctrl+b to ctrl+a, make sure tmux isn’t running and create the following file:

 

vi ~/.tmux.conf

 

Here we have used the text editor vi to create the file. Now add the following:

 

unbind C-b

set -g prefix C-a

 

Save the file. Now the next time you start tmux it should have changed to what you’re used to!