设置linux时间

设置linux时间
# 设置时区
sudo timedatectl set-timezone Asia/Shanghai   
# 开启设置时间
timedatectl set-ntp no
# 具体设置时间
timedatectl set-time "2025-06-11 19:05:55"
# 重启
reboot
# 立即关机
sudo shutdown -h now
# 立即重启
sudo shutdown -r now# 禁用NTP
sudo timedatectl set-ntp false
# 恢复NTP
sudo timedatectl set-ntp true