如上图所示,安装好Linux了,但是发现Linux系统的时间和当前中国东八区真实时间不一致,怎么办呢?
1 参照正确的时间手动修改时间
2 同步网络时间
为了更加准确,我选择同步网络时间,据图操作如下:
1 查看本机ntpd状态,ntpdate 简称ntpd。
systemctl status ntpd
上图表示ntpd没有启动,使用如下代码启动ntpd:
systemctl start ntpd
如下图所示,ntpd已经启动:
如果系统没有安装ntpd,使用如下命令安装,启动,设为开机自动启动:
yum -y install ntpd #安装ntpd
syatemctl start ntpd #启动ntpd
syatemctl enable ntpd #设置开机自启动
如下图所示,时间已经同步完成