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.or
As a system administrator I prefer you to use the following technique: