Home >Operation and Maintenance >Linux Operation and Maintenance >Garbled characters appear on the console in Linux
1. The system must install the Chinese language pack
# yum -y groupinstall chinese-support
2. Set the corresponding character set (relevant learning video tutorial sharing: linux video tutorial )
## 临时生效 # export LANG="zh_CN.UTF-8" # 设置为中文 # export LANG="en_US.UTF-8" # 设置为英文,我比较喜欢这样 export
## 永久生效, 编辑/etc/sysconfig/i18n(最好reboot一下) LANG="zh_CN.UTF-8"
## 或者,编辑 /etc/profile配置文件,添加如下一行 export LANG="zh_CN.UTF-8"
3. Reload
# . /etc/profile
4. View the current character set
# echo $LANG
Complete.
Recommended related articles and tutorials: linux tutorial
The above is the detailed content of Garbled characters appear on the console in Linux. For more information, please follow other related articles on the PHP Chinese website!