Ubuntu 10.04 is in the middle of a transition between two service management systems: SysVinit (the traditional system, used by most Linux distributions) and Upstart (a newer system pushed by Ubuntu and becoming available in more and more distributions).
SysVinit service management scripts are in
/etc/init.d. You can start the service with
/etc/init.d/SERVICENAME start and stop it with
/etc/init.d/SERVICENAME stop. Whether the service is started automatically on boot depends on the presence of symbolic links in
? is a digit from
5 (the runlevel). The easiest way to prevent a service from starting automatically on boot is to use
update-rc.d SERVICENAME disable.
Upstart service management configuration files are in
/etc/init. You can start the service with
start SERVICENAME and stop it with
stop SERVICENAME. The configuration file
/etc/init/SERVICENAME.conf contains a line indicating when to start the service:
start on …. An easy way of disabling these services is to change that line to
start on never and (…). If you don't want to edit the file, you can also completely disable the service without confusing the packaging system by renaming it to not end in
dpkg-divert --add --local --divert /etc/init/foo.conf.disabled --rename /etc/init/foo.conf
As of Ubuntu 10.04, Apache comes with a SysVinit script and Mysql comes with an Upstart script.