Update-rc.d & rc. local manage Ubuntu boot

Source: Internet
Author: User
Although the preface was original, after all, I studied the startup of Ubuntu for two whole days. During the study, I watched the linux private house dish of laruence and studied/etc/init. d/shell Source Code, etc., but it is undeniable that I have read a lot of articles in China and abroad, and the final solution is based on a good blog article. Here I will first make recommendations: through the update-rc.d management ubuntu boot http://www.linuxidc.com/Linux/2013-01/77553.htm preface although it is original, after all, I started Ubuntu boot research for a whole two days, during watching laruence linux private dish, research/etc/init. d/shell Source Code, etc., but it is undeniable that I have read a lot of articles in China and abroad, and the final solution is based on a good blog article. Here I will first make recommendations: manage ubuntu boot update-rc.d via http://www.linuxidc.com/Linux/2013-01/77553.htm next, I will record some of my own gains as per reference blog (testing environment ubuntu10.04 & ubuntu12.04) Ubuntu system run level
  • 0 system shutdown status
  • 1. maintenance status of a single user or System
  • 2 ~ 5 Users
  • 6. Restart
Update-rc.d overview Linux services can be started, stopped and reload with the use of scripts stocked (store) in /Etc/init. d/. However, during start up or when changing runlevel, those scripts are searched in/etc/rcX. d/where X is the runlever number (you can use the runlevel command to view the default runlevel of the system ). this tutorial will explain how one can activate (activation), disactivate or modifu a service start up. when installing a new service under debian, the default is to enable it. so for instance, if you just installed apache2 package, after you installed it, apache service will be started and so will it be upon the next reboots. if you do not use apache all the time, you might want to disable this service from starting up upon boot up and simply start it manually when you actually need it by running this command: sudo/etc/init. d/apache2 start You coshould either disable this service on boot up by removing any symbolic links in/etc/rcX. d/SYYapache2 or by using update-rc.d.The advantage of using update-rc.d is that is will take care of removing/adding any required links to/etc/init. d automatically. taking apache2 as an example. as you can see, for runlevels 0, 1 and 6 there is a K at the ining of the link, for runlevels 2, 3, 4 and 5, there is a S. those two letters stands for Kill and Start.
Removing A ServiceIf you want to totally disable apache2 service by hand, you wowould need to delete every single link in/etc/rcX. d /. using update-rc.d it is a simple as: update-rc.d [-f] servicename remove
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.