Disable services on boot – Ubuntu 12.04


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


转载地址:http://www.gaggl.com/2012/06/disable-services-on-boot-ubuntu-12-04/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值