每次改都去查,还是记录下吧
设置前先检查下
当前时区
1 | timedatectl |
当前时间
1 | date |
设置时区
查看有哪些时区
1 | timedatectl list-timezones |
设置时区
1 | timedatectl set-timezone Asia/Shanghai |
同步时间
手动设置时间
1 | timedatectl set-time "YYYY-MM-DD HH:MM:SS" |
使用NTP自动设置
1 | apt install ntp |
重启触发NTP
1 | systemctl restart ntp |