Changing LANG From De_DE To En_US In CentOS 6

Home » CentOS » Changing LANG From De_DE To En_US In CentOS 6
CentOS 1 Comment

Hello,

on a Macbook with OSX Yosemite (which prints de_DE.UTF-8 as value of
$LANG in Terminal) and VmWare Fusion 7 I have installed CentOS 6.6
minimal.

When I SSH to my new VM as root, the $LANG is de_DE.UTF-8 too.

I would like it to be en_US.UTF-8 instead.

I have grepped /etc and /root for “de_DE”, but nothing is found there.

Grepping for LANG in /etc gives many results, esp. /etc/sysconfig/i18n contains:

LANG=”en_US.UTF-8″
SYSFONT=”latarcyrheb-sun16″

So where does the change to de_DE happen and what is the best spot in CentOS 6 to set that to en_US.UTF-8

(I understand that I could set LANG in /root/.bash_profile but am looking for a better place to do that).

Thank you Alex

One thought on - Changing LANG From De_DE To En_US In CentOS 6

  • ssh is setting it, based on your terminal settings.

    In /etc/ssh/sshd_config you’ll see a lines starting with “AcceptEnv” – one of the settings will be LANG. This tells the SSH daemon to accept the LANG value sent by the client. A standard SSH client (/etc/ssh/ssh_config) has “SendEnv” settings, and LANG is one of those…

    So you can do various things:
    1) Stop sshd from accepting LANG (edit sshd_config, restart)
    2) Stop SSH client from sending LANG
    3) Modify .profile