Linux系统在安装的时候,总是会出现时区,时间的错误。

Linux系统时间和本地区网络时间同步,ntpdate可以从网络同步时间,

需要安装sudo yum install ntp ntpdate,设置开机自启sudo systemctl start ntpdsudo systemctl enable ntpd

ntp只能同步时间,使用timedatectl设置时区,timedatectl命令在systemd包中,默认安装。

timedatectl可以查看时间和时区,timedatectl list-timezones查看所有的时区,timedatectl set-zone Asia/Shanghai设置时区为上海,执行ntpdate同步Asia/Shanghai的时间。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
  • 2021-11-19
  • 2022-01-09
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-14
  • 2022-12-23
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案