LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

loadkeys

load keyboard translation tables for the console

TLDR

Load keyboard layout
$ sudo loadkeys [en|de|dvorak]
copy
Load default keymap
$ sudo loadkeys --default
copy
Load keymap for specific console
$ sudo loadkeys -C /dev/ttyN [layout]
copy
Load from file
$ sudo loadkeys -C /dev/ttyN [path/to/keymap]
copy
Create binary keymap
$ loadkeys --bkeymap > [output.bmap]
copy
Parse keymap without loading
$ loadkeys --parse [keymap]
copy

SYNOPSIS

loadkeys [options] [keymap...]

DESCRIPTION

loadkeys reads keymap files and loads the keyboard translation tables into the kernel, changing the keyboard layout for virtual consoles.

PARAMETERS

-d, --default

Load default keymap
-C, --console DEVICE
Target specific console device
-m, --mktable
Output kernel source table
-b, --bkeymap
Output binary keymap
-p, --parse
Parse keymap without loading
-q, --quiet
Suppress all normal output
-u, --unicode
Force Unicode mode
-a, --ascii
Force conversion to ASCII
-s, --clearstrings
Clear kernel string table
-c, --clearcompose
Clear kernel accent table
-t, --tkeymap [shape]
Output a text keymap (optional shape: 2, 4, 8, 16)
-V, --version
Display version number and exit

INSTALL

sudo apt install kbd
copy
sudo dnf install kbd
copy
sudo pacman -S kbd
copy
sudo apk add kbd
copy
sudo zypper install kbd
copy
nix profile install nixpkgs#kbd
copy

CAVEATS

Only affects Linux virtual consoles, not X11 or Wayland. Changes apply to all virtual consoles simultaneously and persist until reboot. Anyone with read access to /dev/console can run loadkeys.

SEE ALSO

Copied to clipboard
Kai