1. MagicESP
  2. Ubuntu Server 22.04
  3. Set Correct Locale for Ubuntu Server

Set Correct Locale for Ubuntu Server

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