I want to change the keyboard to us in the console.

I am able to change the layout in the startx environment via

sudo dpkg-reconfigure keyboard-configuration

but it doesn't change in the console. If I use startx and then use the lxterminal the keyboard switched to us, but after reboot to the console it doesn't.

I also changed the default file via:

sudo nano /etc/default/keyboard

and changed the gb to us.

All in all if I am in the startx environment it works in the console it doesn't. Even when it has worked in the startx environment and then logoff to the console the keyboard switches back to gb.

Hope someone can help me, I googled and had a look on other sites but couldn't change the problem.

I tried it with 2 different keyboards, both from Dell but I think it shouldn't be a fault caused by the keyboard.

3 Answers 3


That's not physical keyboard issue, but system problem. Have a look here

  • thx I will have a look at it
    – Max
    Commented Oct 30, 2014 at 1:26
  • Thats a link only answer. Can you expand the answer to include the essential information form the link? Commented Nov 23, 2019 at 11:20

I'm assuming Raspbian:

sudo raspi-config

then go to 4 Internationalisation Options, then I3 Change Keyboard Layout. Select a US keyboard layout, and you should be up and running.

  • As I have written in my question I already did this. My command is just the shortcut of your answer. But thx anyway
    – Max
    Commented Oct 30, 2014 at 1:20
  • Not exactly; raspi-config calls invoke-rc.d keyboard-setup start after dpkg-reconfigure, which is a little more than just editing /etc/default/keyboard …
    – scruss
    Commented Oct 30, 2014 at 2:22
  • sudo raspi-config, changing settings plus reboot did the job just fine for me. Reference: Keyboard layout for Your country
    – hakre
    Commented May 13, 2016 at 15:43

For me this final working solution was:

sudo raspi-config

"Raspbian GNU/Linux 8 (jessie)" has slightly different menu items names(compared to the previous reply) in "raspi-config" dialog:

  • -> 4 Localisation Options -> I3 Change Keyboard Layout

Also you need to choose your second language (e.g. Russian) as keyboard layout, then setup other options and finish configuration. All changes will be applied immediately.

After this your /etc/default/keyboard file will look like

$ cat /etc/default/keyboard


# Consult the keyboard(5) manual page.



Before this I've tried 2 other ways:

  1. manually configure locales using sudo cat /etc/default/keyboard + reboot

  2. sudo dpkg-reconfigure keyboard-configuration + reboot

Both methods didn't enable local switching shortcuts.

P.S: Also you can manually edit /etc/default/keyboard file than launch raspi-config

  • In my kernel version raspi-config has no Internationalisation Options and no I3 in Localisation Options. But editing sudo nano /etc/default/keyboard XKBLAYOUT and setting it to "de" worked Commented Apr 30, 2017 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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