Ubuntu – enable/disabling NTP server

12.04ntp

Our application runs on ubuntu 12.04 precise. On this server, we have both ntpdate and ntp. How to enable and disable NTP service on-demand? I tried 'sudo update-rc.d -f ntp remove/default' and 'sudo update-rc.d ntp enable/disable' commands, but when I reboot server the ntp service starts running! I suspect ntpdate starting ntp service on reboot. I removed ntpdate package from one of my experimental server- then ntp didn't start on reboot after issuing command 'update-rc.d ntp disable'.
Is there a way to control this? or is there way to permanently disable ntpdate?

Thanks.

Best Answer

Nowadays all the linux distributions after ubuntu14.04 use sysctemctl. So if you want to enable or disable ntp server use following.

sudo systemctl start ntp

or

sudo systemctl stop ntp

As a system administrator I prefer you to use the following technique:

sudo /etc/init.d/ntp restart
Related Question