Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

As the question is clear from the title, how do I change Linux services startup/boot order?

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

You can change the order by renaming the symlinks under /etc/rcX.d/ where x will be your run level.

You'll see a bunch of files starting with Sxx or Kxx. S links are traced during startup while the K ones are parsed for shutdown. The xx here represents the order.

But this order is set for a reason, so be careful while changing them.for example. ntpd should start only after the networking subsystem is initialized.

share|improve this answer
add comment

You want to read a little about your runlevels and rc.d directories. Inside the rc.d directories you can find the S and K links, like S20apache K10apache, that is basically what orders startup/shutdown of scripts.

There are some changes being made on this architecture but most of the linuxes are still using it.

share|improve this answer
    
I'm amazed most distros still use this system; better systems like rcorder have been around for a while. –  Chris S Aug 30 '10 at 12:42
    
I kinda envy solaris svc, but could do without the xml stuff –  coredump Aug 30 '10 at 12:45
    
This is spot on. Depending on your distro, however, you may have different ways of altering this value--so read up on the specific documentation for your distro. –  Andrew M. Aug 30 '10 at 12:53
1  
Some distributions, such as Ubuntu, use Upstart ( Wikipedia ). –  Dennis Williamson Aug 30 '10 at 14:03
add comment

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.