16

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 ?

3
  • @JacobVlijm: Since this question is about displayed language, the question about input language is probably not a duplicate. Sep 13, 2015 at 20:46
  • @closevoters, It is not a duplicate at all. And it is a very good question.
    – Pilot6
    Sep 14, 2015 at 22:03
  • @JacobVlijm Please delete your first comments. Everyone is voting to close because of them.
    – Pilot6
    Sep 14, 2015 at 22:15

3 Answers 3

14

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.

8
  • 2
    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...
    – Byte Commander
    Sep 13, 2015 at 19:59
  • @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.
    – Pilot6
    Sep 13, 2015 at 21:39
  • 1
    this had changed all the system language at restart. Is there any way to change only terminal language ?
    – Burawi
    Sep 14, 2015 at 5:14
  • 1
    @Burawi I updated the command. It works for me. It changes output only in terminal. It does not affect GUI.
    – Pilot6
    Sep 14, 2015 at 10:31
  • 1
    @Pilot6 Thank you so much! This was something I wanted to achieve for YEARS! Finally! :) Apr 20, 2017 at 2:30
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).

0

I originally tried Pilot6's answer and it seemed to work (export LANG=C), but I quickly noticed that zsh (with oh-my-zsh) was glitching out.

This seems to fix it:

export LANG=

I got this answer from this thread.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .