In Debian, I am used to set the LANGUAGE environment variable in /etc/environment. Now with Debian testing I found /etc/default/locale, which is updated by update-locale. The update-locale man page states it performs some sanity checks but never details them, so: what are these checks? are they important or even essential? can I set /etc/default/locale as I did /etc/environment, or should I absolutely use update-locale?


There are just two sanity checks:

  • the requested locale must exist (otherwise update-locale exits and /etc/default/locale isn't modified)
  • if a value is specified for LANGUAGE, it must be valid (otherwise it is ignored)

So there's nothing which requires you to use update-locale instead of editing /etc/default/locale yourself, but it is a good idea to use it to avoid mistakes.

  • Thanks a lot, that was exactly what I was looking for. Since I always did /etc/environment, I guess I am qualified enough to do /etc/default/locale myself, if only because I am too lazy to use update-locale. Not that it takes much more effort. – lfd Mar 1 '17 at 23:12

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.