Home  >  Article  >  Operation and Maintenance  >  What should I do if centos7 cannot input Chinese?

What should I do if centos7 cannot input Chinese?

王林
王林Original
2020-04-02 10:08:575391browse

What should I do if centos7 cannot input Chinese?

Cause analysis:

It may be that Chinese fonts are not installed.

Solution:

1. Check the current display format and encoding

echo $LANG //一般默认显示为en_US.UTF-8

2. Check whether the Chinese font is installed

locale -a | grep 'zh_CN*' //查看是否有zh_CN.UTF-8

3. Install the Chinese font ( If not)

yum install kde-l10n-Chinese

4. Modify the configuration file

vi /etc/locale.conf //修改配置文件

Add configuration:

LANG=“ZH_CN.utf-8”

Save.

5. Modify the startup file

Since the file will be automatically loaded after the system restarts, the configuration file will be overwritten.

vi /etc /etc/profile.d/lang.sh

The content is:

What should I do if centos7 cannot input Chinese?

Modify to:

What should I do if centos7 cannot input Chinese?

This way it will not become invalid after restarting.

6. Restart linux

reboot

Recommended related tutorials: centos tutorial

The above is the detailed content of What should I do if centos7 cannot input Chinese?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn