Possible Duplicate:
Bash Script on Startup? (Linux)

I want to run some commands at boot time.


1 Answer 1


Use /etc/rc.local

On my system, the comment header says this:

# 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.
  • This is for Debian and Debian-derived distributions such as Ubuntu. Other distros might be different.
    – LawrenceC
    May 16, 2011 at 13:40
  • 2
    It works on CentOS/RHEL as well.
    – jonescb
    May 16, 2011 at 14:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.