I am French and use my Debian system in French.

However, I would like to have error messages in terminal in English. It allows me to post them on English speaking websites.

How can I change my locale to do so? I precise I don't want to have all my system in English.


4 Answers 4


You have to change LANG and LANGUAGE variable in current shell.


export LANG=en_US.UTF-8
export LANGUAGE=en

in your shell rc file ( for bash it is ~/.bashrc ) and restart the terminal session ( or just source the rc file one more time with source ~/.bashrc or even just restart bash with exec bash )

Note, that you have to generate this locale before.

Also you can use export LANG=C.

Also there are other LANG variables (from man bash):

   LANG   Used to determine the  locale  category  for  any  category  not
          specifically selected with a variable starting with LC_.
          Used   to   set   messages   languages  (as  LC_MESSAGES)  to  a  
          multi-valued value, e.g., setting it to fr:de:en will use French  
          messages  where they exist; if not, it will use German messages,  
          and  will  fall  back  to  English  if neither German nor French  
          messages are available.  
   LC_ALL This  variable  overrides  the  value  of LANG and any other LC_
          variable specifying a locale category.
          This variable determines the collation order used  when  sorting
          the  results  of pathname expansion, and determines the behavior
          of  range  expressions,  equivalence  classes,   and   collating
          sequences within pathname expansion and pattern matching.
          This  variable  determines  the interpretation of characters and
          the behavior of character classes within pathname expansion  and
          pattern matching.
          This  variable  determines  the locale used to translate double-
          quoted strings preceded by a $.
          This variable determines the locale  category  used  for  number

You can call an application with the following syntax:

For example you want the English manpages (for just a single command):

user@host:~# LC_ALL=C man ls

Or you run into an error (my system is in German):

user@host:~$ ls -la /root/
ls: Öffnen von Verzeichnis /root/ nicht möglich: Keine Berechtigung

user@host:~$ LC_ALL=C ls -l /root/
ls: cannot open directory /root/: Permission denied
  • Useful (but I accepted another answer because my question was about permanently doing this).
    – ppr
    Dec 17, 2013 at 17:30
  • 2
    more "C" than "c", "c" doesn't work on my Debian 8.
    – Tristan
    May 10, 2017 at 9:19
  • I suggested an edit for LC_ALL=C instead of LC_ALL=c which fails too for me with message bash: warning: setlocale: LC_ALL: cannot change locale (c)
    – el-teedee
    Sep 8, 2018 at 19:01

If you just want the error messages and not the whole locale, you can use:



Try referencing this: 1) https://wiki.debian.org/ChangeLanguage

In short, you want to set your LOCALE (via LANG), preferrably in your .bashrc.

export LANG=en_US.UTF-8
  • ok but I don't want to change my system language. I just want to have some error message in English. Changing the system language has plenty of consequences.
    – ppr
    Dec 17, 2013 at 17:26
  • I beleive putting it in your .bashrc will only affect your shell, as well as any commands that read the .bashrc. If you omit "export", it will not be propagated to commands you start from that shell.
    – C. Kelly
    Dec 17, 2013 at 17:29
  • @ckelly That changes a bunch of things besides the error message language. For example, sort orders, number formatting, ...
    – derobert
    Dec 17, 2013 at 17:30
  • @ppr ok, but I don't want to change my system language — Why then did you accept an answer which gives the same "solution"? Feb 15, 2017 at 17:52

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.