Change keyboard layout to german language

Hi all,
I have installed openHabian successfully on a pi3.
How can I change it to a german keyboard layout. Using openhabian-config. there it is only possible to change the language to german concerning error messages and so on. But when using the keyboard there is still ‘en_US.UTF-8’ selected. That means e.g. when using character ‘z’ on keyboard character ‘y’ is displayed and vice versa.
Could anybody support me on this?
Thanks a lot,

Have you tried raspi-configure?

Hi James,

Not until now, but I’ll try it next time.


The language of the keyboard should be changed with the locale/language setting in openhabian-config. Do not use raspi-config, it will not help. Better check here for the complete answer:

Besides that: You are trying to make your german keyboard work, which tells me that you are trying to work with the RPi by actually connecting a display and a keyboard. That’s not the ideal way. You should consider working on your powerful PC via SSH, giving you many benefits while the relatively weak RPi can sit in the shelve/corner.

1 Like

Yes, you’re right I’m trying to work with the RPi by actually connecting a display and a keyboard.
But when I’m working via SSH (e.g. Putty) with my PC, are there no changes necessary to get the right (german) keyboard layout that means press on ‘Y’ get an ‘Y’ and not a ‘Z’ ?
Best Regards

That’s correct and also the reason why I never had the need to set the keyboard layout myself.

Hi Rolf, it must read raspi-config and in fact “sudo raspi-config” is the whole thing. Another easy way is to run “sudo dpkg-reconfigure locales”. Good luck.

As I said before, raspi-config is not available on openHABian because it’s replaced by openhabian-config.

Using SSH from my notebook it’s working fine :slight_smile:
That means german keyboard layout without any necessary changes.
So it’s really not needful to connecting a display and a keyboard with RPi
to work with it.
Thanks a lot,

1 Like

This is old, but i struggle to configure the keyboard and change the language to german.
Yes, I am aware of using keyboard and monitor is not perfect.
I set the language in "Set System Locale "to “de_DE-UTF-8” at the in openhabian-config.
After the reboot the keyboard language is still in english.


edit the file: /etc/default/keyboard
and change the line: XKBLAYOUT=“gb”
to one of the following keyboard layouts: “us”, “de”, “fr”, “ua”, “ru”, “gb”, or other - there is a complete list embedded half-way down in the file: /usr/share/X11/xkb/rules/xorg.lst
I use a “us” keyboard, however, openhabian’s default is “gb” therefore characters like | are hard to find.
It is handy to be able to plug a monitor and keyboard in, particularly if you need to troubleshoot network issues and can’t ssh to the rpi.