Forrest logo
back to the localectl tool

localectl:tldr:40f9f

localectl: Show the current settings of the system locale and keyboard mapping.
$ localectl
try on your machine

The localectl command is used to control and query the system's locale and keyboard layout settings on Linux systems that use the systemd initialization system.

When you execute the "localectl" command, it provides information and allows you to manage the following aspects:

  1. System Locale: It displays the current default system locale and allows you to set a new one. The system locale determines the character encoding, language, and formatting conventions used by default on the system.

  2. Keymap: It displays the current keyboard layout used by the system and allows you to change it. The keymap defines the mapping of keys on the physical keyboard to characters or functions.

  3. X11 Keymap: It shows the X11 keymap currently used by the X server (if applicable). The X11 keymap can be different from the system keymap and determines the keyboard layout within X11 applications.

  4. Virtual Console Keymap: It displays the keymap used by the virtual console (text mode interface). You can change it using the localectl command.

  5. Font: It shows the current console font being used. You can set a new font using localectl.

In addition to these functionalities, the localectl command also provides options to query and set other locale-related configurations, such as the time zone, additional keyboard mappings, and more.

Please note that the localectl command requires root privileges to modify system settings.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the localectl tool