How to view the current locale setting
How to change the locale setting
To change the current locale setting, first confirm that the desired locale is
installed on the system with:
# locale -a en_US en_UK fr_FR C
If the desired locale is not in the list, you will need to install the
appropriate packages for that locale. See the Note below for more information
about locale packages.
Note: To set a default locale for a user’s environment, set the LANG or LC_*
variables in a user’s shell intialization file such as $HOME/.profile or
How to change the locale by setting the system default locale
Example from the /etc/default/locale file:
# Lines of this file should be of the form VAR=value, where VAR is one of
# TZ, LANG, or any of the LC_* environment variables.
Note: The system must be rebooted after making changes to the /etc/default/init file in order for the changes to take effect.
How to verify the locale setting
After setting or changing the locale, verify that the locale is set correctly:
Check if the locale is set correctly by running the locale command without any