Two methods are available for Linux to add boot items.

Source: Internet
Author: User

Two methods are available for Linux to add boot items.
1. Edit the/etc/rc. local file.
Vim/etc/rc. local


#! /Bin/sh
#
# This script will be executed * after * all the other init scripts.
# You can put your own initialization stuff in here if you don't
# Want to do the full Sys V style init stuff.

Touch/var/lock/subsys/local
# Add the program you want to start or execute the command at the end of the file (before exit 0) (the executed program requires an absolute path, except for the system environment variables ),
For example/Usr/local/thttpd/sbin/thttpd-C/usr/local/thttpd/etc/thttpd. conf 2. Write a shell script by yourself.

Put the written script (. sh file) to the directory./Etc/profile. d/,

After the system starts, all shell scripts in the directory will be automatically executed.


How to add a linux Startup item

Start the nxp service at startup. You can do this:
Vi/etc/rc. local
Add the following statement at the end of the file:
/Etc/init. d/nxp start
The service you want to start must be written as an absolute path !! Otherwise, the service cannot be started !!!
In this way, your system will automatically start the nxp service every time it starts.

How to Set a boot entry for a dual linux System

If grub is used to boot the system, set/boot/grub. conf in this file.

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.