Alexander Farber
2014-Dec-21 10:04 UTC
[CentOS] Changing LANG from de_DE to en_US in CentOS 6
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
Stephen Harris
2014-Dec-21 10:09 UTC
[CentOS] Changing LANG from de_DE to en_US in CentOS 6
On Sun, Dec 21, 2014 at 11:04:30AM +0100, Alexander Farber wrote:> 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. > > So where does the change to de_DE happen and what is the best spot inssh 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 -- rgds Stephen