Tmux is a terminal multiplexer. It allows a single terminal to emulate multiple terminals, organising them into windows(tabs) and panes. This can be helpful especially when connecting to a host remotely via ssh and having multiple terminals visible on the screen at the same time can be useful in many situations e.g. following a log file whilst changing configuration in another pane. Whilst there are some client-side integrations with tmux such as Iterm2, which displays remote tmux windows locally in seperate graphical tabs/windows, tmux works with any terminal with cursor control. (If vi works in a terminal, tmux will too)

Like GNU screen, tmux can be controlled through key combinations. These key combinations all start with a prefix. The prefix is a single key or a combination of keys which tells tmux that it should listen to the next keystrokes and not send them to the active terminal. By default the prefix is ‘Ctrl-b’. This is a good choice by default as this is very unlikely to interfere with the use of the terminals. Unfortunately, This prefix requires two keys to be pressed and is slightly unwieldy. The prefix key can easily be remapped in the tmux config file (either in the users local .tmux.conf or the system /etc/tmux.conf). One popular single-key prefix is the backtick (`) although this has the disadvantage of making SQL queries harder to type. Luckily Mac keyboards include the (mostly unused) section symbol ‘§’ key on the top-left of the keyboard. This makes a good choice of prefix key since it is very quick to type, easy to find and not often used.

Changing the prefix key is usually straightforward, however the § key is not a standard character, the unicode character hex code must be specified instead as shown.

unbind C-b
set-option -g prefix 0x0A7
bind-key 0x0A7 send-prefix
set-option -g prefix2 C-b

In this case the ‘Ctrl-b’ prefix is also set as an alternative prefix in case tmux is being used from a terminal without a conviniently located § key.