0

I'm running KDE neon 5.20 and found two files /etc/locale.conf and /etc/default/locale with similar content. What's the difference between these two files and which one should I edit to change the system locale?

0

Different distributions or versions of Linux employ one or the other. As a case in point, the documentation for Debian 10 refers mainly to /etc/default/locale (e.g. man update-locale). Its systemd-related parts refer also to /etc/locale.conf (e.g. man locale.conf).

A brief test shows that localectl (also part of Debian 10's systemd) reports the contents of /etc/default/locale as system locale, unless /etc/locale.conf exists as well: in this case it apparently takes precedence.

I am using /etc/default/locale exclusively (again, on a current version of Debian). My rational is as follows: this one can be appropriate for Debian, either one is appropriate for system, so in sum it's a clear choice.

2
  • I still don't understand why there are two files. If I set LC_TIME=en_US.UTF-8 in /etc/default/locale and LC_TIME=en_GB.UTF-8 in /etc/locale.conf, what will the LC_TIME be as a result (I don't have Ubuntu installed at the moment to check this)? – popov895 Apr 14 at 18:15
  • @popov895 Well I guess there are two different lineages. An older one that employs /etc/locale.conf and a newer one that employs /etc/default/locale. – rookie099 Apr 15 at 7:43
0

After some experiments, I've determined that KDE neon respects the locale settings in /etc/default/locale, but ignores the locale settings in /etc/locale.conf. I still don't understand why Ubuntu uses a different location for the locale file, but I came to the conclusion that on Ubuntu based distributions it's necessary to use /etc/default/locale to set the locale. Also, I just replaced /etc/default/locale with a symlink to the /etc/locale.conf, and everything works fine, but now I have only one file with the locale settings.

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.