unknown command error when loading .tmux.conf

Solution 1:

It appears tmux.conf syntax has changed and these commands no longer generate a syntactically valid file.

To convert options shown by tmux show -g to valid tmux commands you need to add set-option -g (shorter alias: set -g) in front of each one.

tmux show -g | sed 's/^/set -g /' > ~/.tmux.conf

Note: one of the lines my tmux show -g generates is prefix2 <NONE> which seems to be invalid later. Just remove it if you need, many other lines should be fine. My tmux version is 2.1-3build1 in Kubuntu 16.04.4 LTS.