I’m playing lately with the new CentOS 7. As usual, I prefer to run the minimal install to keep the disk usage at a minimum, and avoid a system loaded with software and services I don’t need. I’m not sure if it’s because of the minimum install mode, but with CentOS 7, as soon as a new system is installed and I run yum, I’m facing everytime this annoying warning message:
Failed to set locale, defaulting to C
So, I figured out a quick way to change the locale settings in CentOS 7.
You just need to create a new configuration file like:
In this new file, enter the needed parameters like mine in this case:
Save the file, and load its parameters using:
I’ve read around someone is suggesting to edit /etc/bashrc. This is a BAD thing to do, this file can be updated from time to time when updating the system, and I’m not sure a non-default file is not dangerous. Profile.d is your place to go.