Managing Startup Services in the Terminal
May 16, 2008 – 2:12 am by \m/ikeInstall a neat new package from apt only to watch in horror as it starts up a (possibly) unnecessary service along with it? “Doodoo! I only wanted to use the standalone cli version of that!”, you yell. Look no further friend.
Of course, there is always the GUI utility found in Menu -> System -> Administration -> Services, but I’ve noticed that for some reason or another, that utility doesn’t always list all the services set to startup at boot. That’s where the command line, once again, saves the day. You’ll need to know the exact name of the service to use the utility, which shouldn’t be that hard to figure out. If in doubt, drop a:
ls /etc/init.d/
in a terminal to see a list of the services available to the system. Once we have our name, we can make use of the Debian service configumator (that’s really its technical name):
sudo update-rc.d apache2 defaults
will start apache at boot in the default run levels (2, 3, 4, and 5). Inversely, running a:
sudo update-rc.d -f apache2 remove
will ensure that apache keeps it face shut at boot. Lots more options for update-rc.d can be found by checking out its man page, if this sort of thing really interests you:
man update-rc.d
Happy servicing! \m/