Home > Article > Operation and Maintenance > 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:
Modify to:
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!