Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Ubuntu system on which current locale is(output of locale command):


I want to change it to en_GB, because some characters are not handled properly on the terminal display.

What is the command to change the locale?

What is the command to see what different locales are available on current system for me to set/try?

share|improve this question
IMO, switching away from UTF-8 is never a solution. I've had my last name mangled one time too many. – grawity Jul 28 '11 at 17:47
What terminal are you using? most of the X11 terminal emulators support utf-8, and utf-8 is the new unix standard. – richard Jan 8 '14 at 15:19
up vote 6 down vote accepted

The used locale is set via environment variables for the process (like the shell running in your terminal).

Most of the time it is sufficient to just change LANG, assuming you use bash

$ export LANG=en_GB

Put this into your ~/.profile file to make it work for all (even non-terminal) processes.

You can have a look at /usr/share/locale/ for some list of locales.

share|improve this answer
Thanks. But when I was trying to set my locale to POSIX, but could not see any entry like 'POSIX' in /usr/share/locale file. – goldenmean Jul 28 '11 at 14:36
Try C for LANG. – Benjamin Bannier Jul 28 '11 at 14:37

You could also use locale -a to get a list of available locales on your system (in addition to /usr/share/locale/, there may be some found in /usr/lib/locale/. For setting the locale, there's also the command setlocale, but I never got that to work and used export as the user honk described.

share|improve this answer

You must log in to answer this question.

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