Configuring tmux

To modify the status bar to show the time of day but not the hostname:

$ echo 'set -g status-right "#h"' >> .tmux.conf

To have tmux use vi keys:

$ echo 'set-window-option -g mode-keys vi' >> .tmux.conf

To reload the tmux configuration:

$ tmux source-file ~/.tmux.conf

To change the default tmux hotkey to Ctrl-a instead of ctrl-b.

This is useful if you are use to using screen and want to use the same hotkey as screen uses by default. It is also useful if you commonly use multiple layers of tmux sessions. So, your local workstation could run tmux with ssh connections to multiple remote machines in different tmux windows. Each of these connections you may also want to run tmux so you have multiple terminal windows via a single ssh connection.

You may want to change the hotkey used for the remote sessions to use ctrl-a instead of the default to reduce the complexity of using multiple layers.

$ echo 'set-option -g prefix c-a' >> ~/.tmux.conf

You can also run this command from the tmux command line to change the hot key on the fly. ^b: to enter command mode and type the following to change it to ^a

set-option -g prefix c-a