New Training: Configure Localization Options
In this 2-video skill, CBT Nuggets trainer Shawn Powers teaches you how to configure a system’s time, along with its location information for localized services. Watch this new Linux training.
Learn Linux with one of these courses:
This training includes:
12 minutes of training
You’ll learn these topics in this skill:
Configuring Clocks and Timezones
Configuring Language and Localization Options
How Do You Configure Locales in Linux?
In Linux, a locale defines the language, country and encoding settings for both applications and shell sessions, through a set of environmental variables. System libraries and localized applications use these variables to provide a localized experience. This can include things such as time and date formats.
To view what locale variables are currently set within your environment, run the locale command. You can find information about a specific locale by running: locale -k [VAR], where VAR is a variable such as LC_TIME. You can get a list of all locales available on your system by running locale -a.
To set the system locale, use the update-locale command. For example, the following command sets the language to UTF-8-encoded English: sudo update-locale LANG=en_IN.UTF-8. You can also set a particular variable, such as: sudo update-locale LC_TIME=en_IN.UTF-8.
In Debian-based distributions, you will find global locale settings in etc/default/locale. In CentOS/RHEL distributions, you will find them in etc/locale.conf.