Change or Set Locales on Linux

Windows Articles

How to install Lighttpd on Ubuntu 20.04?

There are many web services in Unix but we always look for the one that best suits our needs. In this case,...

How to install Docker on Ubuntu 20.04 / Debian 10?

Docker is a fairly popular technology in today's sysadmin. It is logical to think because it means a complete change in the way images...

How to install Mantis Bug Tracker on Ubuntu 20.04?

Hi, folks. In this post, I will help you to install Mantis Bug Tracker on Ubuntu 20.04 If you...

How to install WordPress with Nginx on Ubuntu 20.04?

Hi, folks. In this post, we will help you install Wordpress with Nginx on Ubuntu 20.04. It's a lot easier than you...

Electron 9.0 available

News has arrived that many developers are going to love. And that is that Electron this great cross-platform application framework has released...

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

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

locale

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

Enjoy!

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to install Lighttpd on Ubuntu 20.04?

There are many web services in Unix but we always look for the one that best suits our needs. In this case,...

How to install Docker on Ubuntu 20.04 / Debian 10?

Docker is a fairly popular technology in today's sysadmin. It is logical to think because it means a complete change in the way images...

How to install Mantis Bug Tracker on Ubuntu 20.04?

Hi, folks. In this post, I will help you to install Mantis Bug Tracker on Ubuntu 20.04 If you...

How to install WordPress with Nginx on Ubuntu 20.04?

Hi, folks. In this post, we will help you install Wordpress with Nginx on Ubuntu 20.04. It's a lot easier than you...

Electron 9.0 available

News has arrived that many developers are going to love. And that is that Electron this great cross-platform application framework has released...