Linux: Running Scripts on Startup

One of the easiest ways to run a script or command on startup is to use the crontab.

The crontab includes an entry string to let you run a script after reboot or on startup.

Enter the crontab.

crontab -e

Add an item to run on startup.


My crontab entry is visible below. I used this to start all my scripts on my Pi creation.

Screen Shot 2014-01-26 at 12.30.43 PM

Other startup options include, writing an entry into the bashrc. For the Pi, you could also write an entry in /etc/rc.local. This article discusses actually creating an init.d script for those interested.

Leave a Reply

Your email address will not be published. Required fields are marked *


Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.