Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

How can you change the keyboard layout (to QWERTY from QWERTZ) on the fly from a Linux shell?

I found this similar question, but the answer was to edit a config file, which is not so easy when you're using a Live CD.

share|improve this question
up vote 5 down vote accepted


share|improve this answer
+1 because you beat me to it :) – ricbax Nov 3 '09 at 4:42
I never said I was running X... I am actually, but do you know how to do it from the console? – Hugh Allen Nov 3 '09 at 10:17

kbdconfig or loadkeys

That's how we used to do it. I don't know if they're still supported; I'll check next time I've got Knoppix running.

share|improve this answer
loadkeys works on Arch. Can't use setxdbmap because I don't have X installed. – tjameson Dec 8 '12 at 17:33

I'm not aware of any tool that changes keymap on-the-fly, but in at least debian it is possible to edit /etc/default/console-setup with your preferred map, and make the system reflect those changes by issuing /etc/init.d/hal restart.

share|improve this answer

Another option:

Go in the menu and add your layout to keyboard:

System->Preferences->Keyboard, where choose Layouts tab and add your language (the default is the one chosen at installation time). Then you can press the Layout Options... button, and look in Key(s) to change layout for the hot keys that changes the Keyboard layout. For me it is Shift+Caps Lock.

Hope to help.

N.B. I'm running CentOS 6.2 with GNOME interface.

share|improve this answer
I wasn't running Gnome (or KDE either). – Hugh Allen Feb 23 '12 at 8:21

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.