When you use xshell to log on to the Chinese version of centos or RedHat, if the output in xshell is Chinese, garbled characters may be displayed. The following method can effectively solve the garbled problem:
Linux Chinese garbled code solution::CopyCodeThe Code is as follows: [root @ localhost ~] # Cd/etc/sysconfig/
[Root @ localhost sysconfig] # cp i18n i18n. Bak # back up the i18n File
[Root @ localhost sysconfig] # echo ""> i18n
[Root @ localhost sysconfig] # vi i18n # Add the following content
Lang = "zh_cn.gb18030"
Language = "zh_cn.gb18030: zh_cn.gb2312: zh_cn"
Supported = "zh_cn.gb18030: zh_cn: Zh: en_US.UTF-8: en_us: en"
Sysfont = "lat0-sun16"
However, after this modification, the Chinese characters displayed in the command line of the Linux host are garbled characters. If you do not log on locally, you can use this method.
Solution 2:
You can modify the remote tool encoding to display Chinese characters normally and display the encoding format in the remote tool as utf8 to solve the problem of Linux Chinese garbled characters! Some tools may not have the function of modifying the encoding. We recommend that you use xhell, Which is powerful!