Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can I disable autostart for a service without uninstalling? For example, I'd like to leave tomcat installed, but I don't want it turning on every time I restart.

share|improve this question

5 Answers 5

up vote 49 down vote accepted

This should do the trick :

Open terminal (CTRL + ALT + t) and type into

sudo update-rc.d tomcat disable

Basically update-rc.d will modify existing runlevel links for the script /etc/init.d/tomcat by renaming start links to stop links.

share|improve this answer

The disable|enable API is not stable and might change in the future. I suggest you use the following command to remove all the symlinks in /etc/rc?.d/:

update-rc.d -f tomcat remove
share|improve this answer
    
This one worked for me. I had uninstalled tomcat manually yet it was trying to shut it down before any reboot. Disable without -f parameter yelded "file does not exists". –  amenadiel Sep 2 '13 at 11:54

More generic and more visual, with a nice UI: sysv-rc-conf

Uncheck the boxes for tomcat7 (runlevels 2 to 5), quit and that's it.

share|improve this answer
    
cool, that's a tool I haven't seen before. It was useful to confirm that the update-rc.d command actually had worked –  STW Mar 19 at 1:14
    
This tool is great, it was the thing I was searching for. Thank you very much for it. –  Utku Özdemir Apr 24 at 7:07

For upstart jobs, you need to disable service like this (e.g. mysql):

$ sudo -s
# echo "manual" > /etc/init/mysql.override
share|improve this answer

depending on your setup, you can search for 'startup applications' in the dash and control everything that starts at startup from there.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.