Set a system-wide keyboard layout once and keep it across boots, consoles and graphical sessions. 04.01.2026 | reading time: 3 min Who wants to set the wrong layout after every reboot? This brief guide shows how to make a keyboard layout stick system-wide and per-session using the common tools so the change survives boots, X11 and console logins. Hands-on: change system and X layout with localectl Check the current state, set console and X11 layouts, and verify the result with these commands: ``` $ localectl status System Locale: LANG=en_US.UTF-8 VC Keymap: us X11 Layout: us $ sudo localectl set-keymap de $ sudo localectl set-x11-keymap de pc105 nodeadkeys $ localectl status System Locale: LANG=en_US.UTF-8 VC Keymap: de X11 Layout: de ``` The commands write persistent configuration (vconsole or xorg conf snippets) so the layout remains after reboot. When distro files matter: Debian and the console On Debian/Ubuntu edit /etc/default/keyboard or run dpkg-reconfigure keyboard-configuration to change XKBMODEL, XKBLAYOUT, XKBVARIANT and XKBOPTIONS permanently; for the text console use loadkeys for immediate effect and localectl set-keymap to persist the mapping across boots. Session-only and Wayland specifics If you only need a session change use setxkbmap for X or your Wayland compositor's settings; desktops like GNOME or KDE manage input sources with their settings (or gsettings/dconf), so persistent GUI changes are often the easiest on a desktop while systemd/localectl or distro config files are best for servers and the console. Edge cases and troubleshooting to try If X ignores the change check /etc/X11/xorg.conf.d/* for an existing 00-keyboard.conf, ensure no desktop daemon overrides settings at login, and remember that model, variant and options matter — a wrong model can swap special keys; to debug, reproduce with a fresh user session and test with setxkbmap or loadkeys first. Wrap-up and next steps Make the change where it belongs: systemd/localectl or distro config for system-wide needs, GUI or compositor tools for desktop sessions, and setxkbmap/loadkeys for quick tests; learn the distinction between console keymaps and XKB to choose the right place to edit. Keep exploring LINUX and consider deepening skills for certification such as CompTIA Linux+ or LPIC-1, with focused exam preparation at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. setup boot-process utilities scripting