English Spanish
For example, if you want to set British English as your default locale, first find the name of this locale by using [option]`list-locales`. Then, as `root`, type the command in the following form:
~]#{nbsp}localectl set-locale LANG=pass:quotes[`en_GB.utf8`]
Changing the Keyboard Layout
indexterm:[localectl,keyboard configuration]indexterm:[keyboard configuration,layout] The keyboard layout settings enable the user to control the layout used on the text console and graphical user interfaces.
Displaying the Current Settings
As mentioned before, you can check your current keyboard layout configuration with the following command:
Displaying the Keyboard Settings
In the following output, you can see the keyboard layout configured for the virtual console and for the X11 window system.
~]${nbsp}localectl status
System Locale: LANG=en_US.utf8
VC Keymap: us
X11 Layout: us
Listing Available Keymaps
To list all available keyboard layouts that can be configured on your system, type:
[command]#localectl# [option]`list-keymaps`
Searching for a Particular Keymap
You can use [command]#grep# to search the output of the previous command for a specific keymap name. There are often multiple keymaps compatible with your currently set locale. For example, to find available Czech keyboard layouts, type:
~]${nbsp}pass:attributes[{blank}][command]#localectl# [option]`list-keymaps` | [command]#grep# `cz`
Setting the Keymap
To set the default keyboard layout for your system, use the following command as `root`:
[command]#localectl# [option]`set-keymap` _map_
Replace _map_ with the name of the keymap taken from the output of the [command]#localectl# [option]`list-keymaps` command. Unless the [option]`--no-convert` option is passed, the selected setting is also applied to the default keyboard mapping of the X11 window system, after converting it to the closest matching X11 keyboard mapping. This also applies in reverse, you can specify both keymaps with the following command as `root`:
[command]#localectl# [option]`set-x11-keymap` _map_