Categories: TutorialsUbuntu

System Locales in Linux

As different users have different preferences for the operating system so they must want to customize it as per their preferences. Some might want different time zones in different languages and different countries with a different currency that they prefer on their Linux interface.

In this case, the locale is used as it can be used to change or set language, countries, time/date format, currencies, and many more as per the user preferences. So we are going to discuss such locales and discuss the process of changing or setting such locales on Linux.

To view the current system locale in Linux

We can look over the current system locale using the following command. With the command, we will get different variables that can be reset with different values as per user preference.

$ locale

Also, using localectl status command, it will result the same.

$ localectl status

To display all available locales in Linux

You can check all available locales on your Linux system with the following command:

$ locale -a

To display details of specific variables in Linux

We can check the details of specific variables using the variable name. In case you want to check details on LC_TIME that stores the time and date format, LC_ADDRESS that stores streets or postal addresses format, LC_TELEPHONE that stores format of telephone settings, and so on.

To get such details, we can run the following commands:

$ locale -k LC_ADDRESS
$ locale -k LC_TIME
$ locale -k LC_TELEPHONE
$ locale -k LC_TIME

$ locale -k LC_ADDRESS

To change or set system locale in Linux

We can change or set system locale in Linux by using the update-locale program. Using the LANG variable, it will allow us to set up the locale for the entire system.

We can set the LANG to en_IN.UTF-8 LANGUAGE and remove the definition for language by using the following command.

$ sudo update-locale LANG=LANG=en_IN.UTF-8 LANGUAGE

Or,

$ sudo localectl set -locale LANG=en_IN.UTF-8

To view Global locale setting

We can check or view the global locale setting in the following file on Linux:

$ sudo vim /etc/default/locale

To change the locale

We can modify the .bashrc profile after already setting the value of locale. Go through the following command:

$ sudo vim ~/.bashrc

To change the locale for single user

To set the global locale for the single user, we can add the following line at the end of ~/.bashrc_profile

$ sudo vim ~/.bashrc_profile
LANG=”en_IN.UTF-8”
export LANG

To get more details on locale, update-locale, and localectl, we can check the manual section as below:

$ man locale
$ man update-locale
$ man localectl

Conclusion:

In this article, you learnt how to set a system and view the locale on Linux. Thank you for reading.

Ubuntu Server Admin

Recent Posts

Decoding design: How design and engineering thrive together in open source

Open source thrives on engineering-driven processes. Fast feedback loops, terminal tools, Git workflows: they’re the…

2 days ago

Developing web apps with local LLM inference

I’ve yet to meet a developer that enjoys working with metered AI APIs. The need…

3 days ago

PinTheft Linux kernel vulnerability mitigation

A local privilege escalation (LPE) security vulnerability in the Linux kernel, codename “PinTheft,” was publicly…

3 days ago

Canonical announces fully Managed Kubeflow AI operations platform on the Microsoft Azure Marketplace

Canonical, the publisher of Ubuntu, today announced the general availability (GA) of Managed Kubeflow on…

3 days ago

A look into Ubuntu Core 26: Cloud-powered edge computing with AWS IoT Greengrass and Azure IoT Edge

Welcome to this blog series which explores innovative uses of Ubuntu Core. Throughout this series,…

4 days ago

CVE-2026-46333 (ssh-keysign-pwn) Linux kernel vulnerability mitigations

An information disclosure security vulnerability in the Linux kernel was publicly disclosed on May 15th,…

4 days ago