/etc/init.d
holds the start up/shut down scripts for various services, but they are actually invoked by the scripts in /etc/rc*.d
.
The rc*.d
scripts are actually hold symbolic links to /etc/init.d
scripts, and the names in the rc*.d
directories say whether to start or stop a service as you enter that run level - the number in the name gives the order in which to run the scripts.
So, for example, /etc/rc3.d/S23ntp
says to start the ntp daemon at run level 3 (after all the lower numbered services have been started).
So - to stop a service running after a reboot, the best thing to do is manipulate the rc*.d
scripts.
And the best way to do that is to use the update-rc.d
command. e.g. to disable ntp at boot, run:
update-rc.d ntp disable
As to what services to disable - be careful that you understand what a service does and its purpose before disabling it.
I was going to give atd
as an example - this is a process that uses very little resource, but stopping it may have unintended consequences.
But as it turns out, atd
is actually invoked by a different mechanism (upstart
) - and I don't have time to go in to that now!