Go Ubuntu System UPDATE-RC.D Command

Source: Internet
Author: User

This article transferred from: http://wangyan.org/blog/ubuntu-update-rc-d.html

To prevent the original blog hanging off, hereby made a backup.

The UPDATE-RC.D command in Ubuntu or the Debian system is the script used to update the system startup items. The links to these scripts are located in the/etc/rcn.d/directory, and the corresponding scripts are located in the/etc/init.d/directory. Before you know the UPDATE-RC.D command, you need to know about the main boot steps of the Linux system, as well as the knowledge of the operating level in Ubuntu.

First, the Linux system main boot step
    1. Read the information from the MBR and start boot Manager.
    2. Load the system kernel, start the init process, the init process is the root process of Linux, all system processes are its child processes.
    3. The init process reads the information from the/etc/inittab file and enters the preset runlevel. Typically, the startup script under the/etc/rcs.d/directory is executed first, followed by the/etc/rcn.d/directory.
    4. Start the Xwindow server Xorg,xwindow as a graphical user interface system under Linux based on the corresponding script in the/etc/rcs.d/folder.
    5. Start the login manager and wait for the user to log on.

Operational level in Ubuntu
    • 0 (Shut down the system)
    • 1 (Single-user mode, only allows root users to maintain the system.) )
    • 2 to 5 (multi-user mode, where 3 is the character interface and 5 is the graphical interface. )
    • 6 (Restart System)

Switching the Run level
init [0123456Ss] Example: init 0 command shutdown; Init 6 command restart

 

Startup Item Management Tool
sudo install sysv-rc-conf//or using tools with GUI Bumsudo sysv-rc-conf

Iii. update-rc.d command to remove a specified startup item from all RunLevel
Update-rc.d-f 
   
     Remove
   
Start or close in specified order, in the specified run level
UPDATE-RC.D 
   
     start|stop 
     
     
       instance: Update-rc.d apachectl start 20 2 3 4 5. Stop 20 0 1 6.
     
    
   

Resolution: expressed in the 2, 3, 4, 5 of these five runlevel, from small to large, the 20th start to run Apachectl, in 0 1 6 of these 3 RunLevel, 20th closes Apachectl. This is the combination of the wording, note that it has 2 points, the effect equals the following method:

UPDATE-RC.D Apachectl Defaults
A starts after B to start, B shuts down after
UPDATE-RC.D A defaults 20update-rc.d B Defaults 90 10
Start and close order is 90, level default
UPDATE-RC.D 
   
     Defaults 90
   

  

Go Ubuntu System UPDATE-RC.D Command

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.