Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to Run Commands Automatically at Linux System Boot Up  (Read 2055 times)

0 Members and 1 Guest are viewing this topic.

sajugovind

  • Guest
How to Run Commands Automatically at Linux System Boot Up
« on: December 27, 2013, 07:55:20 pm »
How to Run Commands Automatically at Linux System Boot Up

If you always have to manually run a command at every system bootup, do it no more! This article will show you how to automatically run anything at system bootup by adding the execution commands to the /etc/rc.local script.

1. Establish a SSH connection and login as root.

2. Open up /etc/rc.local with your favorite command line text editor. In this example, I will use ‘nano’.
nano /etc/rc.local

3. Write the code on the very top.

4. Save with Ctrl+O and Exit nano with Ctrl+W

That is it; reboot your server to test it.