Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of CentOS7 locale

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the CentOS7 regional setting example analysis, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.

CentOS7 locale

The configuration file for the locale is in / etc/locale.conf, which is set by the localectl command

The systemd service reads the zone configuration file at startup and completes the setup of the system.

Several common methods of commands are as follows:

1 View current configuration

[root@localhost ~] # localectl status

System Locale: LANG=en_US.UTF-8

VC Keymap: us

X11 Layout: us

2 View the available regional languages

[root@localhost ~] # localectl list-locales | grep CN

Bo_CN

Bo_CN.utf8

Ug_CN

Ug_CN.utf8

Zh_CN

Zh_CN.gb18030

Zh_CN.gb2312

Zh_CN.gbk

Zh_CN.utf8

3 set regional voice

Localectl set-locale LANG=zh_CN.utf8

4 Keyboard layout viewing and configuration using the following commands will not be described in detail.

Localectl list-keymaps

Localectl set-keymap

Localectl set-x11-keymap

5 localectl can also configure the regional configuration of the remote system, adding the-H parameter is fine.

-H-- host= [user @] HOST Operate on remote host

6. Several keywords of the localectl command:

Keyword

Default system voice for LANG

LC_COLLATE changes the alphabet

LC_CTYPE change character function processing

LC_NUMERIC digital format

LC_TIME time format, 24-hour format, or 12-hour format.

LC_MESSAGES configures the language in which standard error messages are used.

Thank you for reading this article carefully. I hope the article "sample Analysis of CentOS7 locale" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report