Quickly change and persist virtual-console keyboard mappings. 16.11.2025 | reading time: 2 min On a headless server or a virtual console the keyboard layout decides if typing credentials or editing files works; this short guide shows how to inspect, change and apply console keymaps with `dumpkeys` and `loadkeys` and how to make them persistent with `localectl` or distro config files. A quick remap example Remap Caps Lock to Escape by creating a minimal keymap file with `echo 'keycode 58 = Escape' > /tmp/mykeys`; apply it immediately with `sudo loadkeys /tmp/mykeys`; verify the result with `dumpkeys | grep 'keycode 58'` which should print `keycode 58 = Escape`. Keep changes across boots On systemd systems make a persistent change with `sudo localectl set-keymap us` or edit the distribution file such as `/etc/vconsole.conf` on Arch or `/etc/default/keyboard` on Debian and then reboot or reapply with `loadkeys` so the mapping survives restarts. Advanced tips and caveats Remember that `dumpkeys` shows keycodes mapped to keysyms so identify the right keycode before changing it; use `setfont` to match console fonts to your characters and avoid confusing changes on X11 where XKB or `setxkbmap` are the correct tools; always keep a backup of the original mapping before overwriting it. Complementary tools Useful related utilities include the kbd package tooling for keymap files, `setfont` for console fonts and `localectl` for systemd based persistence, and note that GUI layouts are managed separately by XKB or Wayland compositors. Where to go next Try remapping a seldom used key to a shortcut you need and script `loadkeys` at boot if your distro lacks an integrated config; deepen your Linux skills and consider certification paths such as CompTIA Linux+ or LPIC-1 and intensive exam preparation at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. setup utilities boot-process troubleshooting scripting