0

OS in my local pc.

uname -a
Linux debian 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3 (2019-09-02) x86_64 GNU/Linux

My current locale.

locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="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"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

I want to set LC_ALL=C.UTF-8.

sudo localectl set-locale LC_ALL=C.UTF-8
Failed to issue method call: Invalid Locale data.

Have a try to set LC_ALL=en_US.UTF-8.

sudo localectl set-locale  LC_ALL=en_US.UTF-8 
Failed to issue method call: Invalid Locale data.

The default value for LC_ALL can only be blank(empty)?

4

As stated in Arch Linux wiki Locale,LC_ALL: troubleshooting:

LC_ALL is the only LC_* variable which cannot be set in locale.conf files: it is meant to be used only for testing or troubleshooting purposes, for example in /etc/profile.

In locale.conf — Configuration file for locale settings, at systemd documentation is stated that:

Note that LC_ALL may not be configured in this file.
1
  • 1
    Given the number of answers here — some with upvotes in hundreds — that set LC_ALL carelessly, this answer should be red-lined somehow!
    – Rusi
    Feb 16 '20 at 12:04

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.