48

Using system settings I changed my language to Arabic and deleted the English language from the settings. Then the computer lagged and it logged out - now I can't log back in because the login is in Arabic.

So is there a way to default my language via terminal, default the login password language, or login via terminal which is still in English. I only have access to guest and a terminal.


I changed the pasword to something that could be translated into arabic http://www.psychocats.net/ubuntu/resetpassword - then loged in and used system settings to default.

55

Edit two files:

  1. sudoedit /etc/default/locale:

    LANG="en_US"
    LANGUAGE="en_US:en"
    
  2. sudoedit ~/.pam_environment:

    LANG=en_US
    LANGUAGE=en_US
    

Logout and Login or Reboot.

9
  • 5
    Nano is also installed by default. :-)
    – LiveWireBT
    May 7 '12 at 17:29
  • 3
    If you want to understand what changing these variables means: help.ubuntu.com/community/Locale
    – yuric
    Apr 29 '13 at 17:25
  • 4
    Also need LC_ALL=en_US.UTF-8
    – hlcs
    Jan 19 '16 at 0:28
  • 2
    If using KDE, you might want to check ~/.KDE/env/setlocale.sh too, as it might conflict.
    – stragu
    Jun 22 '16 at 4:15
  • 2
    This also works for "Bash on Ubuntu" on Windows 10.
    – user608329
    Oct 18 '16 at 6:46
3

In order to get back to English, I had to change my locale in 3 places:

  1. /etc/default/locale

    by running this command:

    $ sudo update-locale LANG=en_US.UTF-8 LANGUAGE= LC_MESSAGES= LC_COLLATE= LC_CTYPE=
    
  2. ~/.config/plasma-localerc and ~/.config/plasma-locale-settings.sh

    By going to my KDE settings / Regional Settings / Language

And reboot.

1
  • I only had to run echo export LANGUAGE=en_US.UTF-8 | sudo tee -a ~/.bashrc
    – Jonathan
    Mar 16 at 13:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.