12

Whenever I reboot my computer, I have to set the keyboard layout in a console again with loadkeys. Is there a way to change the default keyboard layout that is loaded every time the computer boots?

3 Answers 3

19

At least for Arch, you have two types of configuration: via console and Xorg.

The easiest way without configuring Xorg:

$ sudo setxkbmap -layout us

You can see the current configuration with this:

$ setxkbmap -print -verbose 10
$ localectl status

To list all the available key maps or layouts:

$ localectl list-keymaps
1
  • 1
    Good, detailed answer. Worked for me without sudo; globally for all already opened apps without logging out.
    – yahol
    Commented Jan 13, 2019 at 13:45
11

Check (my) /etc/vconsole.conf:

KEYMAP="hu"

See releated wikipage for more information!

1
  • First, list all acceptable values with the command $ localectl list-keymaps Commented Aug 5, 2017 at 6:16
3

How to persistently change console layout:
sudo localectl set-keymap --no-convert us
The result is the same as directly editing /etc/vconsole.conf. To also change the layout for user prompts that run early in boot like for LUKS passwords, rebuild the initramfs with mkinitcpio -P

To persistently change layout that's used outside of console, you can use sudo localectl --no-convert set-x11-keymap but that command is more confusing, so read the second Arch Wiki article linked below before using it. As an example, here's how to set the dvorak variant of the us keymap to default: sudo localectl --no-convert set-x11-keymap us "" dvorak ""

Setting console layout: https://wiki.archlinux.org/title/Linux_console/Keyboard_configuration#Persistent_configuration
Setting non-console layout: https://wiki.archlinux.org/title/Xorg/Keyboard_configuration#Using_localectl

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .