Garbled characters are always not displayed on SSH terminals, especially the apt-GET command. I did the operations on the Internet many times and did not succeed (I did not thoroughly study the character encoding problem, but copied the command according to Huludao). I finally found that it was a problem with the setup of the terminal software, set to unicode-utf8. The following are some previous settings on the server:
1. Install Apt-GetInstall Language-Pack-ZH, installed by default
2. Edit/Etc/Environment, add or change:
Lang = "zh_CN.UTF-8"
Language = "zh_cn: Zh: en_us: en"
3. Edit/VaR/Lib/Locales/Supported. d/Local:
En_US.UTF-8 UTF-8
Zh_CN.UTF-8 UTF-8
Zh_cn.gbk GBK
Zh_cn gb2312
En_GB.UTF-8 UTF-8
4. Execute the command: locale-gen
5. Modify/etc/default/locale:
Lang = "zh_CN.UTF-8"
Language = "zh_cn: Zh: en_us: en"
6. Run the locale command to view the environment variables.