- 安装 ntpdate
yum install -y ntpdate
- 同步ntp服务器或者阿里云服务器
ntpdate -u ntp.api.bz 或者 ntpdate ntp.aliyun.com
- 查看时间
date 或者 date "+%Y-%m-%d %H:%M:%S"
虚拟机 Linux 时间同步
于 2022-02-18 11:40:05 首次发布
- 安装 ntpdate
yum install -y ntpdate
- 同步ntp服务器或者阿里云服务器
ntpdate -u ntp.api.bz 或者 ntpdate ntp.aliyun.com
- 查看时间
date 或者 date "+%Y-%m-%d %H:%M:%S"