tmux: need UTF-8 locale

Sometimes with a VPS provider that uses a really minimal Debian or Ubuntu image, you can get the following message after installing and running tmux

 

tmux: need UTF-8 locale (LC_CTYPE) but have ANSI_X3.4-1968

 

To fix, run:

localectl set-locale LANG=en_US.UTF-8

Then uncomment

en_US.UTF-8

from /etc/locale.conf

Then run:

locale-gen