↓ Skip to main content
Linux

Locale

Did you ever see a warning printed on your console the moment you log into your Linux machine and did that warning ever complaned to you about the benign locale?

If you are always troubled by these statements as you log in your CentOs machine

-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

and badly wished to do away with them. I have a solution for you.

Just need to add below entries into /etc/environment and you are good to go.

LANG=en_US.utf-8
LC_ALL=en_US.utf-8

Also the other way you check and set information of locale on a CentOS system is via localectl command.

localectl –help

This command will show some information around what all options you can play with while dealing with the locale information

Some experiments
#

localectl status
#

System Locale: LANG=en_US.UTF-8
VC Keymap: us
X11 Layout: us

cat /etc/locale.conf
#

LANG=”en_US.UTF-8″

localectl list-locales
#

This will dump a long list of locales supported in your system.

localectl set-locale LANG=en_IN.utf8
#

I tried using this and if I verify the locale status I get the desired information available to me.

Author
Samarthya
Engineer, learner, tinkerer. This is my trophy shelf of everyday work and leisure.

Related

CSS and HTML to dom.

·5 mins
Happiness is not always straight lines. Having worked on different technologies I never took HTML very seriously till a couple of years back. I started programming rather seriously programming when I was about 20 years old for a small startup then – FQSL. In those days, my primary responsibility was more around creating a middle – tier application which had a management interface and had the ability to spawn multiple threads to handle the incoming traffic and the main concern was to handle the load effectively and perform under pressure. This was all to be done in a native platform “Windows” and mostly in VC++ and MFC. Glad we are in serverless days now. 🙂

Vue - Lesson 2

·1 min
Zero configuration CLI command line interface Create things rapidly select libraries you want to use Optimize the loading speed CHoose your own adventure Starting from a blank state organizing the structure.

Creating your app with VUEJS

·3 mins
This is my attempt at learning a new framework and using it to create my own webapp uing vueJS. Vue is a progressive and reactive framework for building user interfaces.