Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

2 Answers 2

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


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.