linux矫正时间

1.设置时间

# 设置系统时间
timedatectl set-time '2025-08-21 18:07:00'
date -s "20250816 10:00:00"

2.查看硬件时间

hwclock --show 或 hwclock -r

-s(--hctosys)从硬件时钟读取时间更新到系统时钟.
-w(--systohc)将系统时钟时间写入硬件时钟.

3.开关同步

timedatectl set-ntp false|true

posted on 2025-08-20 15:09  Colin88  阅读(13)  评论(0)    收藏  举报