How to change language only for terminal

14,614

Solution 1

You can add a line

export LANG=C

to the end of your ~/.bashrc file and restart the terminal.

All program output will be in English.

Solution 2

An Alternative approach is to run this:

export LC_ALL=en_US.UTF-8

For more permanent solution for you own user account only just put the command above into ~/.bashrc file

You will see the change in your next terminal session. For an immediate change without the need of a new terminal session run:

source ~/.bashrc

In case of multiple terminal sessions (eg. using terminator) you will need to run the command above on each one of them.

So any terminal related error message will be in English (as fas as any gnu-utils related software).

Share:
14,614

Related videos on Youtube

Burawi
Author by

Burawi

Updated on September 18, 2022

Comments

  • Burawi
    Burawi almost 2 years

    I'm using Arabic as the default language but there are some issues when displaying it in terminal. So I want to change the language only in terminal to English, how can I do that ?

    • Gunnar Hjalmarsson
      Gunnar Hjalmarsson almost 9 years
      @JacobVlijm: Since this question is about displayed language, the question about input language is probably not a duplicate.
    • Pilot6
      Pilot6 almost 9 years
      @closevoters, It is not a duplicate at all. And it is a very good question.
    • Pilot6
      Pilot6 almost 9 years
      @JacobVlijm Please delete your first comments. Everyone is voting to close because of them.
  • Byte Commander
    Byte Commander almost 9 years
    You can just type this line as command in your open terminal session to change the language only inside this window and only until you close it. New windows will not be affected. To only run a single command in English, you can write the LANG=C directly in front of the command itself, e.g. LANG=C sudo apt-get update. @Pilot6: Maybe you want to edit that into your answer...
  • Pilot6
    Pilot6 almost 9 years
    @ByteCommander It is obvious that you can type it each time. The whole point is to set English output to all terminal commands. That was the question.
  • Burawi
    Burawi almost 9 years
    this had changed all the system language at restart. Is there any way to change only terminal language ?
  • Pilot6
    Pilot6 almost 9 years
    @Burawi I updated the command. It works for me. It changes output only in terminal. It does not affect GUI.
  • Pilot6
    Pilot6 almost 9 years
    Are you sure you added it to the correct file?
  • Muhammad bin Yusrat
    Muhammad bin Yusrat about 7 years
    @Pilot6 Thank you so much! This was something I wanted to achieve for YEARS! Finally! :)
  • Max
    Max almost 5 years
    For those wondering what this does, this turn off localization altogether : see superuser.com/questions/219945/why-lang-c-not-d-or-e-or-f
  • Rγσ ξηg Lιαη Ημ
    Rγσ ξηg Lιαη Ημ about 3 years
    @Pilot6, cheers :)