Introduction
localectl can be used to query and change the system's regional settings, as well as keyboard configuration. It communicates with systemd-localed to modify files such as /etc/locale.conf and /etc/vconsole.conf.
The system's regional settings control the language settings for system services and the user interface before the user logs in, including the display manager, as well as the defaults for users after login.
The keyboard configuration controls the keyboard layout used in the text console and graphical user interface before the user logs in, including the display manager, as well as the defaults for users after login.
Please note that changes made with this tool may require the initramfs to be rebuilt to take effect during early system boot. Localectl does not automatically rebuild the initramfs. Systemd-firstboot can also be used to initialize the system's regional settings for mounted (but not booted) system images.
In the Linux Images available on Clouding, a clean installation of the operating system is used, with only English language support. This article explains how to install and configure additional languages.
Installation and Configuration of Additional Languages
Language package installation:
# apt install language-pack-es
# yum -y groupinstall base "Development tools"
# yum install -y langpacks-es
Configure the language with localectl:
# localectl set-locale LANG=es_ES.UTF-8 && export LANGUAGE=es_ES.UTF-8
Additionally, you can set the time zone:
# timedatectl set-timezone "Europe/Madrid"
To check the configuration, you can query the status:
# localectl status
To apply the changes, reboot the operating system:
# reboot
Language package installation:
# apt install language-pack-ca
# yum -y groupinstall base "Development tools"
# yum install -y langpacks-ca
Configure the language with localectl:
# localectl set-locale LANG=ca_ES.UTF-8 && export LANGUAGE=ca_ES.UTF-8
Additionally, you can set the time zone:
# timedatectl set-timezone "Europe/Madrid"
To check the configuration, you can query the status:
# localectl status
To apply the changes, reboot the operating system:
# reboot
*You can check the article in Catalan for different variants, you can click here.
Language package installation:
# apt install language-pack-ja
# yum -y groupinstall base "Development tools"
# yum groupinstall -y "Japanese Support"
Configure the language with localectl:
# localectl set-locale LANG=ja_JP.UTF-8 && export LANGUAGE=ja_JP.UTF-8
Additionally, you can set the time zone:
# timedatectl set-timezone "Asia/Tokyo"
To check the configuration, you can query the status:
# localectl status
To apply the changes, reboot the operating system:
# reboot
Language package installation:
# apt install language-pack-zh-hans
# yum -y groupinstall base "Development tools"
# yum groupinstall -y "Chinese Support"
Configure the language with localectl:
# localectl set-locale LANG=zh_CN.UTF-8 && export LANGUAGE=zh_CN.UTF-8
Additionally, you can set the time zone:
# timedatectl set-timezone "Asia/Shanghai"
To check the configuration, you can query the status:
# localectl status
To apply the changes, reboot the operating system:
# reboot
Language package installation:
# apt install language-pack-ko
# yum -y groupinstall base "Development tools"
# yum groupinstall -y "Korean Support"
Configure the language with localectl:
# localectl set-locale LANG=ko_KR.UTF-8 && && export LANGUAGE=ko_KR.UTF-8
Additionally, you can set the time zone:
# timedatectl set-timezone "Asia/Seoul"
To check the configuration, you can query the status:
# localectl status
To apply the changes, reboot the operating system:
# reboot
We hope this tutorial has been helpful. If you have any questions about this or any other issue related to your servers on Clouding, do not hesitate to contact support@clouding.io. We are here to help!