The locale is the configuration of a Linux system that provides a region, keyboard, time-related data. The locale is important because it will change the interpretation of some keyboards etc. If you are getting the following warning like “Setting locale failed” we will look at how to solve it.
List Current Locale Setting
Listing of current locale settings can be done just by issuing locale commands. We do not need to provide an option for listing.
As we can see that there are different locale settings like
Change Local Variable
We see that
LC_ALL environment variable is not set and the problem is that some application needs this locale to be set. We will use
update-locale command in order to change the current locale. We will also provide the locale we want to set which is
en_US.UTF-8 in this example.
$ sudo update-locale LC_ALL="en_US.UTF-8"
update-localeis a command which will update locale configuration
LC_ALL="en_US.UTF-8"is the locale variable we want to update
To effect the settings log out and log in for locale command.