Where to put export LC_ALL=C?

15,437

You can either simply enter them by hand in each terminal you open, like the following:

LC_ALL=C
LANG=C

or you put it into .bashrc in the following way:

LC_ALL=C
LANG=C
export LC_ALL LANG
Share:
15,437

Related videos on Youtube

Léo Léopold Hertz 준영
Author by

Léo Léopold Hertz 준영

Vacare.

Updated on September 18, 2022

Comments

  • Léo Léopold Hertz 준영
    Léo Léopold Hertz 준영 over 1 year

    I ran it once, but my terminal native language went back to Finnish. I've tried unsuccessfully .bashrc and .profile.

    I have followed the thread here about How to set all locale settings in Ubuntu. I have also tried to setup English as locale:

    sudo update-locale LANG=en_EN.UTF-8 LC_MESSAGES=POSIX
    

    But output:

    *** update-locale: Error: invalid locale settings:  LC_NAME="fi_FI.UTF-8" LC_TIME="fi_FI.UTF-8"
    LC_IDENTIFICATION="fi_FI.UTF-8" LC_NUMERIC="fi_FI.UTF-8"
    LC_MESSAGES=POSIX LANG=en_EN.UTF-8 LC_MEASUREMENT="fi_FI.UTF-8"
    LC_ADDRESS="fi_FI.UTF-8" LC_PAPER="fi_FI.UTF-8"
    LC_MONETARY="fi_FI.UTF-8" LC_TELEPHONE="fi_FI.UTF-8"
    

    Where can you put export LC_ALL=C?

    • egmont
      egmont almost 8 years
      Do not do this, unless you exactly know what you're doing (in which case probably you wouldn't ask this question). This locale has the ANSI (7-bit) charset rather than UTF-8, that is, anything other than plain English characters will be hopelessly broken. At the very least you should have LC_CTYPE=C.UTF-8 (this is only available on Ubuntu and a few other distros, by far not on all Linuxes). Probably you're better off with going for en_US.UTF-8 instead.
    • Léo Léopold Hertz 준영
      Léo Léopold Hertz 준영 almost 8 years
      @egmont Please, make your comment an answer.
    • egmont
      egmont almost 8 years
      I did not answer your question :P
    • Léo Léopold Hertz 준영
      Léo Léopold Hertz 준영 almost 8 years
      @egmont You did. It is the best answer here with explanation why so should be done as you explain.
  • Léo Léopold Hertz 준영
    Léo Léopold Hertz 준영 almost 8 years
    Second thing gives the output bash: export: 'LC_ALL,LANG': not a valid identifier in terminal.
  • Léo Léopold Hertz 준영
    Léo Léopold Hertz 준영 almost 8 years
    Does not work in profile, no error, but still Finnish in ls -la.
  • Videonauth
    Videonauth almost 8 years
    Did you do a reboot and check the second part again I had a , where no one had to be!?
  • Léo Léopold Hertz 준영
    Léo Léopold Hertz 준영 almost 8 years
    No. Your 2nd set of commands do not also work with/without comma in Ubuntu 16.04. They put my GUI terminal time; so I could not write back for some time. It also took two times to restart the system to recover. I just fixed the thing in another TTY simply. I also tried all combinations of the two commands; but also export LC_ALL; export LANG Do they work in your system?
  • Videonauth
    Videonauth almost 8 years
    mhmmm, weird they work on my system , the second set i mean, but another thought why not set the system itself on the gui side to use English language, and fin measurements?