I'm running KDE neon 5.20 and found two files
/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?
Different distributions or versions of Linux employ one or the other. As a case in point, the documentation for Debian 10 refers mainly to
man update-locale). Its systemd-related parts refer also to
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.
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.