localectl(1)
Control the system locale and keyboard layout settings.
Synopsis
localectl [OPTIONS...] {COMMAND}Description
localectl is a command-line utility for querying and changing the system locale and keyboard layout on systemd systems. It manages locale variables (language, character encoding, date/time format) and X11/console keyboard layouts without requiring direct editing of configuration files.
Changes made with localectl are persistent and affect all users on the system. The tool communicates with systemd-localed, a system service that handles locale configuration.
Common options
| Flag | What it does |
|---|---|
--help | Show help message and exit |
-H, --host=HOST | Execute the operation on a remote host |
--no-pager | Do not pipe output into a pager |
--no-ask-password | Do not ask for sudo/authentication password |
Examples
Show current locale and keyboard layout settings
localectlList all available locales on the system
localectl list-localesSet the system locale to English (US) with UTF-8 encoding
localectl set-locale LANG=en_US.UTF-8Set language to German and time locale to German format
localectl set-locale LANG=de_DE.UTF-8 LC_TIME=de_DE.UTF-8List all available keyboard layouts
localectl list-keymapsSet console keyboard layout to US
localectl set-keymap usSet X11 keyboard layout to German
localectl set-x11-keymap deSet keyboard to French without converting X11 layout
localectl set-keymap --no-convert fr