How to set Debian to automatically update time and date?

You can set the time during system boot actually, and from the Debian Documentation they even specify it for use on hardware that doesn’t keep track of time properly. I recommend using NTP though. You can set it up to connect to an NTP server. First install NTP though, using

$ sudo apt-get install ntp

Once it’s installed, navigate to /etc/ntp.conf which you can edit using your favourite text edit. Say, gedit or nano.

$ sudo nano /etc/ntp.conf

I’m not sure if it needs sudo, but you can use it anyway.

You need to know an NTP server to set this. Modify your file to be like so:

 logfile /var/log/xntpd
 driftfile /var/lib/ntp/ntp.drift
 statsdir /var/log/ntpstats/

 statistics loopstats peerstats clockstats
 filegen loopstats file loopstats type day enable
 filegen peerstats file peerstats type day enable
 filegen clockstats file clockstats type day enable

 server ntp.somedomain.something
 server ntp.something.else

Replace the somedomain.something and something.else with NTP servers. You can find some hfrom the NTP server home.

0 Reviews

Write a Review

Teo

Read Previous

Errore di Microsoft Office Professional Plus 2016 durante l’installazione.

Read Next

E anche quest’anno……

Leave a Reply

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.