How do I change the language of the terminal to English?
I am familiar with using vi
.
If the terminal language is controlled by etc/default/locale
, what am I supposed to change there?
LANG="el_GR.UTF-8"
LANGUAGE="el:en"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
Best Answer
Tl; dr
since you want to set everything to English (assuming that programs using GNU gettext should use Greek as a fallback language):
Or if some
LC_*
variables are defined already in your shell's environment and you wish to override them:To make the settings stick, add the
export
s at the end of~/.bashrc
.Changing
/etc/default/locale
will affect the whole system's locale and consequently the locale of all users who didn't set a specific locale, so you shouldn't change it if you want to change only the language of the command running in your user's terminal / console.The locale of the commands running in your user's terminal / console can be changed by exporting the following environment variables:
LANG
defines the value to be used for each non-explicitly definedLC_*
variable; so if none of theLC_*
variables is currently defined in your shell's environment (that is the default behavior, ifenv | grep '^LC_'
doesn't output anything it means that's the case) and you wish to set the value of all the categories toen_US.UTF-8
, simply exportLANG
:Otherwise you'll have to either also override each previously defined
LC_*
variable or (alternatively, more easily) just exportLC_ALL
, which overrides any previously definedLC_*
variable:However programs using GNU gettext will rely on
LANGUAGE
rather thanLANG
/LC_ALL
(unlessLANG
/LC_ALL
is set toC
) and will set the language based on its content.LANGUAGE
should define a list of colon-separated languages. If a translation for the first colon-separated language listed is not available, the program will try to use to the second colon-separated language listed etc; for example, to set English as the preferred language and Greek as a fallback language:So in your case, since you want to set everything to English (assuming that programs using GNU gettext should use Greek as a fallback language):
Or if some
LC_*
variables are defined already in your shell's environment and you wish to override them:To make the settings stick, add the
export
s at the end of~/.bashrc
.