What should I do if centos7 cannot input Chinese?

王林
Release: 2020-04-02 10:08:57
Original
5346 people have browsed it

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
Copy after login

2. Check whether the Chinese font is installed

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

3. Install the Chinese font ( If not)

yum install kde-l10n-Chinese
Copy after login

4. Modify the configuration file

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

Add configuration:

LANG=“ZH_CN.utf-8”
Copy after login

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
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!