Server Fault is a question and answer site for system and network administrators. 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

When I open any kind of terminal I get this error

bash: warning: setlocale: LC_ALL: cannot change locale (en_US)

My /etc/default/keyboard contains


and /var/lib/locales/supported.d/local contains

en_GB.UTF-8 UTF-8
en_US.UTF-8 UTF-8

In dpkg-reconfigure keyboard-configuration selected I

Generic 105-key (Intl) PC
The default for the keyboard layout
No compose key


What I would like is to have Danish keyboard layout, and everything else (menus and such) should be English.

Can anyone figure out why I get this error and perhaps how to correct it?

share|improve this question
up vote 1 down vote accepted

Locale doesn't really have much to do with keyboard layout.

The error message is a result of setting your locale to en_US, presumably either in /etc/default/locale or one of your shell startup files, but it looks like you've only asked the system to provide en_GB.UTF-8 and en_US.UTF-8.

On a modern system both UTF-8 locales are good choices, so the answer is figure out where you've specified en_US and replace it with en_US.UTF-8 or en_GB.UTF-8, according to taste.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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