1. 查看当前系统时间
date
2. 设置时区
sudo tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
1) Africa
2) Americas
3) Antarctica
4) Asia
5) Atlantic Ocean
6) Australia
7) Europe
8) Indian Ocean
9) Pacific Ocean
10) coord - I want to use geographical coordinates.
11) TZ - I want to specify the timezone using the Posix TZ format.
#?
之后依次输入
4 (Asia),9(China),1(Beijing Time),1(Yes)
3. 将文件复制到localtime目录下
sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
4. 确认时间
date
5. 重启操作系统
sudo reboot now