Language and regional settings control how messages, dates, currencies, and other data appear across a Linux system. Adjusting the system language changes the default locale for login shells, desktop environments, cron jobs, and many services so that new sessions use the preferred language instead of the original installation choice. This is especially useful on shared hosts, remote servers, or systems that need to support multilingual workflows.
Under the hood, Linux locale behaviour is driven by environment variables such as LANG, LC_*, and LC_ALL, plus compiled locale data stored under /usr/lib/locale or similar directories. On systemd-based distributions, localectl configures these variables and writes the chosen defaults to files like /etc/locale.conf or /etc/default/locale so that display managers and shells inherit consistent settings for every user.
Different families of distributions provide additional tooling on top of localectl to generate locale data, including dpkg-reconfigure locales and /etc/locale.gen on Ubuntu and Debian. Changing the system language requires administrator privileges and may affect scripts that assume a particular output format, so new values should be tested from a separate session before relying on them in production. Many applications only read locale variables at startup, which makes a logout or reboot an important final step for fully applying changes.
$ whoami root
Administrator-level access is required because locale configuration files under /etc and locale data under /usr are owned by root.
$ locale LANG= LANGUAGE= LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE="C" LC_MONETARY="C" LC_MESSAGES="C" LC_PAPER="C" LC_NAME="C" LC_ADDRESS="C" LC_TELEPHONE="C" LC_MEASUREMENT="C" LC_IDENTIFICATION="C" LC_ALL=C
LANG defines the primary language, while individual LC_* variables override specific categories such as dates, numbers, and currency formatting.
$ localectl list-locales | head C.UTF-8 en_DK.UTF-8 en_US.UTF-8
Only locales present in this list are ready for use; if a desired locale is missing on Ubuntu or Debian, generate it with sudo dpkg-reconfigure locales or by enabling it in /etc/locale.gen and running sudo locale-gen.
$ sudo localectl set-locale LANG=en_US.UTF-8
Include the character encoding suffix such as UTF-8 to ensure correct handling of non-ASCII characters in terminals and applications.
$ sudo localectl set-locale LANG=en_US.UTF-8 LC_TIME=en_DK.UTF-8
Category-specific overrides keep most messages in the primary language while borrowing date, time, or number formats from another locale.
$ localectl status
System Locale: LANG=en_US.UTF-8
LC_TIME=en_DK.UTF-8
VC Keymap: (unset)
X11 Layout: (unset)
Existing shells and desktop sessions retain their original LANG and LC_* settings until they are restarted.
$ export $(cat /etc/default/locale | xargs) $ LC_ALL= locale | grep -E '^(LANG=|LC_TIME=)' LANG=en_US.UTF-8 LC_TIME=en_DK.UTF-8