5

How can I force Ubuntu's system clock to pull and update time from a time server?

According to Ubuntu Wiki no longer supports ntpdate command (at least in Ubuntu Desktop LTS 16.04), and I've already tried using timedatectl as a command. That means that this question already answered is no longer useful for LTS 16.04.

Eliter
  • 69

1 Answers1

1

ntpdate is in the ntpdate package, which you could install via sudo apt install ntpdate. Then read man ntpdate.

As mentioned in the comments, one needs to install the package ntp instead of ntpdate in Ubuntu 18.04+.

Remember to tell ntp to stop before running ntpdate:

sudo /etc/init.d/ntp stop

and start ntp afterwards:

sudo /etc/init.d/ntp start
Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212
waltinator
  • 36,399
  • 1
    Why did they remove it then? – Eliter Mar 13 '17 at 22:27
  • 1
    on Xubuntu 18.04 i had to install ntp instead of ntpdate - ntpdate is still a package, but it doesn't install the ntp service, but the package named ntp installs the ntp service :o – hanshenrik Apr 30 '20 at 09:48