So apparently, CentOS decided I was Dutch, and thus, should not have a English locale.

Apart from the fact that this greatly bothers me, I am having a pretty hard time actually changing it back. There does not seem to be a setlocale function, and system-config-language tells me I am using an English locale, even though my environment says otherwise.

Any help would be appreciated.

Output from locale:


Both my ~/.bashrc as ~/.bash_profile contain no locale settings. Additionally, /etc/bashrc does not contain any locale references either.

  • Make sure LANGUAGE is not set (or set to your desired value). It is not listed by locale but still overrides all other language settings in command line software like vim and dnf.
    – dreua
    May 3, 2021 at 12:19

4 Answers 4


I just stumbled on this exact same problem, and found out why this is happens in my case and thought i'd share. I recently got a new iMac at work that runs OS X Lion (previous workstation was OS X Snow Leopard)

OS X Lion by default sets the locale in env variable LANG in Terminal. This was set to nl_NL.UTF-8. Sshd on the CentOS system imports this environment variable in its shell when you ssh into your CentOS box.

I solved it by disabling 'Set locale environment variables on startup' in Terminal preferences (settings->advanced)

Don't know if you run OS X on your desktop, but bottom line is: sshd on CentOS imports the locale settings from the ssh client workstation.



If you use SSH, there is another way to achieve the same result, which works in iTerm as well. You must modify the SSH configuration:

sudo vi /etc/ssh_config

Find and comment out the line containing

SendEnv LANG LC_*

If system-config-language doesn't help you, try this.

  1. Go to the CentOS system configuration directory

    $ cd /etc/sysconfig
  2. Make backup copy of your language setting file

    $ cp i18n i18n.backup
  3. Edit language setting file to allow English as default. You can edit the file by using nano or vim text editors available on all CentOS systems from SSH. I prefer vim, but nano is more easier:

    $ nano i18n
  4. Edit the file to include these lines as the first three lines of the file:

    $ LANG="en_US.UTF-8"
    $ SYSFONT="latarcyrheb-sun16"
    $ SUPPORTED="en_US.UTF-8:en_US:en"
  5. Save the file and restart system. If you can not restart the system you need to have permission to restart init.d

That should enable the new language setting. If you can not perform these through SSH because the access is too restricted, you will likely need to notify the ISP or whoever has physical access to the server.

Regards and best wishes.


At least Fedora 16 defines language in GRUB command line. See /boot/grub/grub.conf and /etc/grub.conf.

Then there's /etc/sysconfig/i18n file which contains language settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.