According to this answer You should change language settings in etc/default/locale
and ~/.pam_environment
, not in ~/.profile
etc/default/locale
is generated by update-locale
so you do this to set LANG=en_GB.UTF-8
(the file also sets LANGUAGE)
update-locale LANG=en_GB.UTF-8
In ~/.pam_environment language settings look the same as in /etc/default/locale
:
LANGUAGE=en_GB:en
LANG=en_GB.UTF-8
and can be edited as desired. You have to log out and back in or use source
:
In general you have to log out and log back in for changes made to ~/.profile
to take effect.
However, you can make them instant using source
source ~/.profile
Example:
I edit my ~/.profile to include:
export foo=bar
save and exit...
in a new shell:
$ echo $foo
(nothing)
$ source ~/.profile
$ echo $foo
bar
If nothing changed after logging out and back in, check that ~/.bash_profile
and ~/.bash_login
do not exist (because, as mentioned by @ByteCommander, if they do exist, ~/.profile
is not sourced)
If either do exist, the best thing to do is probably to copy any commands from them into your ~/.profile
and rename them something like ~/.bash_profile_old
and ~/.bash_login_old
, so that ~/.profile
gets sourced (and you are not depending on bash being your shell)
If neither of them exist, it may be that ~/.profile
is still not getting sourced for some reason:
See Eliah Kagan's answer here for more detail
The suggested workaround is to use... ~/.pam_environment
UTF-8
encoding does not make any sense to theC
locale. Also the best place to setLANG
is/etc/default/locale
.C.UTF-8
is fairly new but it does make sense. See sourceware.org/glibc/wiki/Proposals/C.UTF-8~/.profile
which prevents it from being run correctly. You can check that with the command:bash -n ~/.profile