Linux Boot Auto-execute script settings

Source: Internet
Author: User

1. First copy the scripts that need to be powered on automatically demoshell to/ETC/INIT.D

2. Modify permissions for this script chmod 755/etc/init.d/demoshell

3. Set the script to execute at startup

Cd/etc/init.d

UPDATE-RC.D Demoshell Defaults 95

The last number indicates the order of execution, which is the first of several executed

This command is equivalent to UPDATE-RC.D Demoshell start 95 2 3 4 5. Stop 95 0 1 6 indicates that 95th runs Demoshell at the level of Linux running 2,3,4,5, and 95th in 0,1,6 RunLevel Demoshell

Also attached:

Operating levels 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)

Linux Boot Auto-execute script settings

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.