Home > computers > linux > ntp | About

How to synchronize your computer with an NTP server ?

Install ntpd on your machine and simply configure it as a client by editing /etc/ntp.conf like so :

server 10.10.10.100 prefer iburst # this is the server's IP
server 127.127.0.1 # this is the hardware clock of your own PC
fudge 127.127.0.1 stratum 10 # this line is mandatory but I don't know what it does.

Leave all other settings alone and restart ntpd.

How to display the difference of time between your computer and the ntp server ?

Use ntpdate -q like so :

ychaouche@ychaouche-PC ~ $ ntpdate -q 10.10.10.100
server 10.10.10.100, stratum 11, offset 0.004271, delay 0.02594
 1 Jul 10:50:47 ntpdate[4511]: adjust time server 10.10.10.100 offset 0.004271 sec
ychaouche@ychaouche-PC ~ $ 

I am very well synchronized with the ntp server, my offset if less then 5 miliseconds which is an excellent score.

How to adjust the time if there's too much delay with the ntp server ?

I don't know you yet. Can you help ? contact me (see footer)

How do you display the server's time remotely ?

Use ntpdate -q, see "How to display the difference of time between your computer and the ntp server ?" above.


contact : @ychaouche yacinechaouche at yahoocom


QR Code
QR Code How to synchronize your computer with an NTP server ? (generated for current page)