1

During installation I just want to run a set of commands and not do all the settings with raspi-config.

How can I set the keyboard layout just with the command line without any further interaction / UIs?

Kai Walter
  • 151
  • 5

2 Answers2

2

I figured out this sed command line to set e.g. german keyboard layout:

sudo sed -i -e 's/XKBLAYOUT="[a-z][a-z]"/XKBLAYOUT="de"/' /etc/default/keyboard
Kai Walter
  • 151
  • 5
1

It's possible to do this via raspi-config nonint do_configure_keyboard. E.g. raspi-config nonint do_configure_keyboard us sets the US keyboard layout.

Reference: Where can I learn about the raspi-config noint parameters?

Thomas
  • 171
  • 7