1. MagicESP
  2. Ubuntu Server 18.04
  3. Ubuntu Server Set Correct Locale

Ubuntu Server Set Correct Locale

Locales are a framework to switch between multiple languages and allow users to use their language, country, characters, collation order, etc. UTF-8 locales should be chosen by default, particularly for new installations.

display current locale

localectl

the result should end with UTF-8 like this, if not, please change it to en_US.UTF-8

System Locale: LANG=en_US.UTF-8

display installed locale

localectl list-locales

change system locale

sudo localectl set-locale LANG=en_US.UTF-8

install locale (optional)

sudo apt -y install language-pack-en-base language-pack-en

dpkg-reconfigure locales (interactively)

sudo dpkg-reconfigure locales