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.

Steps to change locale settings on Linux:

  1. Open a terminal with access to root or sudo privileges.
    $ whoami
    user

    Administrator-level access is required because locale configuration files under /etc and locale data under /usr are owned by root.

  2. Display current locale variables for the active session.
    $ locale
    LANG=en_GB.UTF-8
    LANGUAGE=en_GB:en
    LC_CTYPE="en_GB.UTF-8"
    LC_NUMERIC="en_GB.UTF-8"
    LC_TIME="en_GB.UTF-8"
    LC_COLLATE="en_GB.UTF-8"
    LC_MONETARY="en_GB.UTF-8"
    LC_MESSAGES="en_GB.UTF-8"
    LC_PAPER="en_GB.UTF-8"
    LC_NAME="en_GB.UTF-8"
    LC_ADDRESS="en_GB.UTF-8"
    LC_TELEPHONE="en_GB.UTF-8"
    LC_MEASUREMENT="en_GB.UTF-8"
    LC_IDENTIFICATION="en_GB.UTF-8"
    LC_ALL=

    LANG defines the primary language, while individual LC_* variables override specific categories such as dates, numbers, and currency formatting.

  3. List all locales currently generated on the system using localectl.
    $ localectl list-locales | head
    C.UTF-8
    en_GB.UTF-8
    en_US.UTF-8
    fr_FR.UTF-8
    de_DE.UTF-8
    ##### snipped #####

    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.

  4. Identify the target language and region code that matches the desired system language, such as en_US.UTF-8, fr_FR.UTF-8, or es_ES.UTF-8.
  5. Set the default system locale using localectl.
    $ 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.

  6. Optionally override specific categories, such as time or numeric formatting.
    $ 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.

  7. Verify the new system locale state through localectl.
    $ localectl status
       System Locale: LANG=en_US.UTF-8
           VC Keymap: us
          X11 Layout: us
    ##### snipped #####
  8. Log out of graphical and SSH sessions that use the old locale values.

    Existing shells and desktop sessions retain their original LANG and LC_* settings until they are restarted.

  9. Log in again so new locale variables initialize for shells and desktop sessions.
  10. Confirm the changed locale from a new shell.
    $ locale | grep -E '^(LANG|LC_TIME)'
    LANG=en_US.UTF-8
    LC_TIME=en_DK.UTF-8
Discuss the article:

Comment anonymously. Login not required.