How to?

Multi machine time syncrhonize

May 8, 2024
osubuntutime
1 Minutes
130 Words
This article was last updated on May 27, 2026 and some of the information may no longer be applicable due to the passage of time.

Multi machine time syncrhonize

ref: https://blog.csdn.net/weixin_44684139/article/details/109844106

服务器 Ubuntu 20.04 nuc

1
sudo apt install ntp
2
sudo vim /etc/ntp.conf

文件最后写入:

1
restrict 192.168.43.0 mask 255.255.255.0 nomodify notrap # 将前三位改成你的子网
2
server 127.127.1.0 # local clock
3
fudge 127.127.1.0 stratum 10

重启 ntp 服务:

1
sudo /etc/init.d/ntp restart

客户端通过网线连接服务器

使用 ifconfig, nmcli dev 和设置查看是否连接正确。实践时,重启 ntp 服务之后两台机子的时间就同步了。

如果不同步,请继续参考 ref。

Problem

  • restart 服务后依然没有同步:试试看 reboot
Article title:Multi machine time syncrhonize
Article author:Julyfun
Release time:May 8, 2024
Copyright 2026
Sitemap