Skip to main content
RH124

Configuring the CentOS 7 Locale

By July 29, 2014September 12th, 2022No Comments

CentOS 7 LocaleSetting the CentOS 7 Locale

Within the systemd eco-system we see many new tools including those that can set the Cent)S 7 locale. The new tools that interface with the systemd system initialization daemon in Enterprise Linux are plentiful and warrants to move away from upstart. In this video we look at the localectl command in CentOS 7.

The system locale is configured in the file /etc/locale.conf but the settings are limited to the sort order, display language, time format etc. Other important setting include the keyboard layout for consoles and the GUI if the X Server is running. The command localectl can display and control many of these setting.The idea is that we can use one command to set both the current and persistent settings needed to set the locale and related data. The developers have decided the  keyboard layout both for physical and GUI application should be configurable through the one tool, rather than two separate files. This type of unification is needed to streamline Linux administration.

The following commands summarize some of what is available.

localectl status # to display locale settings
localectl set-locale LANG=en_GB.utf8 # to set the Language
localectl list-locales # to lists locales
locale list-keymaps # list keyboard mappings
locale set-keymap uk # sets the key map

The video will step you through the command usage.