Home > Operation and Maintenance > Linux Operation and Maintenance > What should I do if the Chinese characters displayed in the Linux terminal are garbled?

What should I do if the Chinese characters displayed in the Linux terminal are garbled?

王林
Release: 2020-05-14 10:52:28
Original
3789 people have browsed it

What should I do if the Chinese characters displayed in the Linux terminal are garbled?

The solution is as follows:

1. Install the Chinese language pack

# yum -y groupinstall chinese-support
Copy after login

2. Set the corresponding character set

## 临时生效 
# export LANG="zh_CN.UTF-8"    # 设置为中文 
# export LANG="en_US.UTF-8"    # 设置为英文,我比较喜欢这样 export 
  
## 永久生效, 编辑/etc/sysconfig/i18n
LANG="zh_CN.UTF-8"
Copy after login

3. Restart

reboot
Copy after login

Recommended tutorial: linux tutorial

The above is the detailed content of What should I do if the Chinese characters displayed in the Linux terminal are garbled?. For more information, please follow other related articles on the PHP Chinese website!

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