In Linux, the program runs automatically upon startup.

Source: Internet
Author: User
In Linux, enable the program to run automatically upon startup-Linux Enterprise Application-Linux server application information. The following is a detailed description. You have two options: one is to run when you have not logged on, and the other is after you log on.

To run a command before logon after startup, add the command to/etc/rc. local:

Open a terminal.

Log on as the root user.

Open this file in your favorite Text Editor:

Gedit/etc/rc. local

Add a line at the end and write the command you want to run.

If you want to execute this program after logging on, log on first.

After logging on, open the program that you want to run automatically.

Then, log out and select "Save Current Settings" when logging out ".

After that, once you log on, this program will automatically run. If you want to stop it and start it automatically, you only need to log on.

After logging on, close the program that runs automatically.

Then, log out and select "Save Current Settings" when logging out ".

By default, "Save Current Settings" is selected to keep the current settings as accurate as before logout.

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.