16.7 C

Change or Set Locales on Linux

The locale is a commonly used term in lots of cases. In the case of your operating system, it has to display a number of texts that will guide you through every single process. A locale is a set of environmental variables defining the language, country and character encoding settings for your OS.

Not only that, locale defines your system’s time format, currency and a number of other values. You’ll easily find out a number of apps that greatly depend on the locales for proper functionality.

In the world, there are numerous languages with different encoding system. English is the default locale that all systems use.

Need to change the locale or add a new one? Let’s go!

Current system locale

- Advertisement -

Before we move on, let’s check out your system’s current locale. Fire up a terminal and run the following command –


localectl status

Using the following command, you can also find out the date and time format –

locale -k LC_TIME


All the variables are present when you run the first command.

Need to find out all the available locales in your system? Run the following command –

locale -a

Changing locale

At first, find out all the available locale for your system –

less /usr/share/i18n/SUPPORTED

The list is HUGE. Once you’ve found out the locale you want to set for your system, run the following command –

sudo localectl set-locale LANG=en_US.UTF-8


If you need to configure just a single parameter of locale, then run the following command –

sudo localectl set-locale <VARIABLE_NAME>=en_US.UTF-8

Don’t need all the locales? Then consider removing the additional ones as they’ll only clog your system further. Run the following command –

sudo locale-gen --purge <locales_YOU_WANT_TO_KEEP>

You can find out the more advanced guides on modifying locales on your system from the “man” pages.

man locale

man update-locale

man localectl

You can also export the “man” pages to text files.

man locale > ~/Desktop/locale.txt

man update-locale > ~/Desktop/update-locale.txt

man localectl > ~/Desktop/localectl


- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
"The best Linux newsletter on the web"


Please enter your comment!
Please enter your name here

Latest article