Synchronize date and time

From WickyWiki
Revision as of 20:21, 18 August 2017 by Wilbert (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


timedatectl

#check state and settings
timedatectl

#turn sync on, it could take some minutes to sync
sudo timedatectl set-ntp true

Ubuntu upgrades to 14.04

Source:

An Ubuntu upgrade keeps the ntpdate configuration intact and timedatectl is turned on but not synchronizing. Since ntpdate is depreciated you can manually uninstall it and replace it with ntp.

#uninstall ntpdate
sudo apt-get autoremove ntpdate

#install ntp daemon (ntpd)
sudo apt install ntp

Force update now:

sudo service ntp stop

#correct the time regardless of the offset (g) and exit immediately (q)
sudo ntpd -gq

sudo service ntp start

Check state and settings:

timedatectl

See also

ntpdate (depreciated)

Source:

sudo ntpdate pool.ntp.org