Fixing Chinese encoding and timezone issues on Kali Linux Raspberry Pi
1. Update the system
sudo apt/apt-get update
2. Install Chinese fonts
sudo apt/apt-get install xfonts-intl-chinese fonts-wqy-microhei fonts-wqy-zenhei -y
3. Install ntp
sudo apt/apt-get install ntp -y
4. Update date and time
sudo ntpdate ntp1.aliyun.com
Aliyun time servers
ntp1.aliyun.com ntp2.aliyun.com ntp3.aliyun.com ntp4.aliyun.com ntp5.aliyun.com ntp6.aliyun.com ntp7.aliyun.com
5. Change environment variables
sudo vim/nano /etc/environment
Enter the following content
LANG="zh_CN.UTF-8" LANGUAGE=en_US:en LC_CTYPE="zh_CN.UTF-8" LC_NUMERIC="zh_CN.UTF-8" LC_TIME="zh_CN.UTF-8" LC_COLLATE="zh_CN.UTF-8" LC_MONETARY="zh_CN.UTF-8" LC_MESSAGES="zh_CN.UTF-8" LC_PAPER="zh_CN.UTF-8" LC_NAME="zh_CN.UTF-8" LC_ADDRESS="zh_CN.UTF-8" LC_TELEPHONE="zh_CN.UTF-8" LC_MEASUREMENT="zh_CN.UTF-8" LC_IDENTIFICATION="zh_CN.UTF-8" LC_ALL="zh_CN.UTF-8"
6. Make environment variables effective
source /etc/environment
7. Change the default encoding, enter the command in the terminal
sudo dpkg-reconfigure locales
Enter the graphical interface, select en_US.UTF-8 UTF-8 and zh_CN.UTF-8 UTF-8 and set zh_CN.UTF-8 UTF-8 as default
8. Select timezone
sudo dpkg-reconfigure tzdata Asia->China->Shanghai
9. Restart
reboot
After rebooting, the English system changes to a Chinese system, and the garbled text is restored to normal