Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As of Ubuntu 12.04, what is the proper/clean way to make the system execute a script upon boot? (not upon user login) e.g. running a daemon.

share|improve this question
up vote 2 down vote accepted

Actually there is a way to execute user specific commands during boot up time. The commands or scripts that we want to execute should be added to the script /etc/rc.local

The script /etc/rc.local will be similar to a shell script. Make sure it's exit status is 0, add the following line to that script "exit 0".

This /etc/rc.local script is executed at the end of each multiuser runlevel.

From here

Also you can see examples in /etc/init.d/

share|improve this answer

You could also try using Upstart which I find to be useful.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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