liunx时间与互联网同步

本文详细介绍如何在Linux系统中使用ntpdate命令进行时间同步,包括安装ntpdate、设置为中国时间服务器及将系统时间同步到硬件时钟的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、安装 ntpdate:
yum install ntpdate
2、设置为中国时间:
ntpdate 0.asia.pool.ntp.org
3、将时间同步到硬件
hwclock --systohc