To keep my desktop (notebook) machine light and responsive I don’t want unnecessary services starting on boot-time. Turns out Ubuntu is surprisingly cumbersome to configure in this area (compared to RedHat / Fedora).

Two services I need on my notebook, but don’t want them to start unless I require them running are MySQL and Apache. But it looks like some services are started using upstart init daemon and it appears there is no management tool for this. Services can pe prevented from auto-starting either by renaming the config file or commenting out the start line in the config file

sudo cp /etc/init/mysql.conf /etc/init/mysql.conf.modified
sudo rm /etc/init/mysql.conf

Or comment out the following line in the config file

sudo vim /etc/init/mysql.conf
#start on runlevel [2345]

Reference: http://upstart.ubuntu.com/cookbook/#disabling-a-job-from-automatically-starting

Other services are still started using rc.d such as Apache. They can be disabled using

sudo update-rc.d -f apache2 disable

Now these services should not start up when the machine boots and can be started manually
sudo service apache2 start
sudo service mysql start


EDIT (2012-08-07): thanks to a comment below from Van Luu there is a GUI option that I was unaware of called BootUp Manager (http://www.marzocca.net/linux/bum.html)

sudo apt-get install bum

Leo Gaggl

ict business owner specialising in mobile learning systems. interests: sustainability, internet of things, ict for development, open innovation, agriculture

This Post Has 10 Comments

  1. Van Luu

    You can install Boot-Up Manager from Ubuntu software center to enable or disable services on start up.

  2. Fawad Hassan

    Very nice tip! Thanks for sharing!
    Thanks to Van also for sharing bum :)

  3. Joni

    Unfortonally bum or Boot Up Manager are not supported by Ubuntu, so security issuess do you self check and see if the developer applies…

  4. leogaggl

    @joni that applies to most additional packages.

  5. Nelson Garcia

    For upstart services in Ubuntu, you can create a manual override in /etc/init.

    For example, to prevent mysql from starting at boot:
    echo “manual” >> /etc/init/mysql.override

    After that, the service can only be started manually. To enable the service to automatically start at boot again, remove the override file.

  6. ubuntu user

    Thanks for the post.

    I just wanted to disable mysql and apache. Mysql uses the “echo manual” method and apache uses the classic run scripts – how crazy that two major software pieces aren’t consistent.

  7. jual laptop

    thanks a lot for your info….that work

  8. Alexandre Magno

    bum is so limited… its basic information is equal to the output of “service –status-all” command. The symbol “?” tells none.

  9. John.s

    Well… services,daemons,etc are started in different way from different places witch is complicated. BUM is NOT able to manage those services, it displays some, but can’t control them. Until now, no real way of having a GUI with everything listed so you can just tick/untick stuff. Want to disable bluetooth? go and rename a .conf file somewhere, and if you want it back fast after a couple of months… you will not remember what you did to disable-it :( VERY poor service management. Want to start samba, ssh, teamviewer… all have different start options, places, commands … it makes living in linux a hell, even for an admin in 21th century … ironic, co’z win is getting perfect at this.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.