Home  >  Article  >  Operation and Maintenance  >  What should I do if the centos terminal displays garbled Chinese characters?

What should I do if the centos terminal displays garbled Chinese characters?

王林
王林Original
2020-05-17 10:24:172946browse

What should I do if the centos terminal displays garbled Chinese characters?

First execute the following command to check whether the current system has a Chinese language pack

locale -a | grep zh_CN*

What should I do if the centos terminal displays garbled Chinese characters?

If the above content is displayed, it means that Chinese has been installed package, if not, execute the following command to install it:

yum install kde-l10n-Chinese

Then execute the following command

vi /etc/locale.conf

The display is as follows

LANG="C"

Change "C" to "zh_CN. UTF-8"

Then execute the command

source /etc/locale.conf

Finally execute the locale command to view the result

What should I do if the centos terminal displays garbled Chinese characters?

As shown in the above figure, it means the modification is successful.

Recommended tutorial: centos tutorial

The above is the detailed content of What should I do if the centos terminal displays garbled Chinese characters?. 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