Super User is a question and answer site for computer enthusiasts and power users. 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

Where does Linux look to start programs on startup? (In Windows we have the registry)

share|improve this question

migrated from May 14 '10 at 20:59

This question came from our site for professional and enthusiast programmers.

On most Linux distributions this is accomplished via runlevels and the rc.d directory:

share|improve this answer

It depends on your linux distribution. Basically you create an init script and setup symlinks. The location and names of the symlinks highly depend on your distribution.

Most distributions have utilities to manage the symlinks: rc-update on Gentoo, update-rc.d on Debian

share|improve this answer

Do you want it to start as part of the initialization process, or on a per-user basis?

If you want it to run during init, the previous answers indicating how to create scripts in rc.d are sufficient.

If you want it to run on a per-user basis, you can add commands to your .bash_profile (or similar) for command-line tools.

For GUI-based tools, Gnome (under Ubuntu 10.10) has the following settings you can play with:

System -> Preferences -> Startup Applications


share|improve this answer

in linux (debian , ubuntu , openSUSE and most of the linux distros) we have the directories /etc/cron.d , /etc/cron.dayly

if you put a bash script on /etc/crond.d it will start wen the system starts,

(don't forget to chmod 777

share|improve this answer

init (short for initialization) is the program on Unix and Unix-like systems that spawns all other processes. It runs as a daemon and typically has PID 1.

Wikipedia - Init.

share|improve this answer
"init" is the most suggestive keyword here, even without being wrapped into a link to wikipedia. It's a shame to see that the SO ecosystem is starting to rot because of inadequate karma abusing downvoters. It will be a pity if people will start leaving because of this, since downvotes without reasons are certainly not motivating to keep helping others. – vtest Nov 1 '10 at 16:28
@vtest: Not downvoting (although I'm sorely tempted to), but I suspect the reason for the downvotes on this answer is that it does not address the question in any meaningful way. Yes, init is the first process started, but neither the copy/pasted text nor the linked article tells the uninitiated how anything else gets set to run on startup. – Dave Sherohman Jan 24 '11 at 11:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .