Home >Operation and Maintenance >CentOS >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*
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
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!