Thursday, May 26, 2016

[JustANote] Keep your linux at the right time with ntpd


To keep your Linux up to date with your local time, you should use ntpd(Network Time Protocol deamon):

1- first specify your timezone to your system(dig /usr/share/zoneinfo to find your own):
ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime 

2 - Install Network Time Protocol daemon:
apt-get install ntp 

3 - Sync time(Give it a public time server):
sudo service ntp stop
sudo ntpdate -s 0.fr.pool.ntp.org
sudo service ntp start

That's it.

Sheda