Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is ubuntu's /etc/init.d directory exactly equivalent (functionally) to what I presume to be the more standard /etc/rc.d/ (at least on arch)? Is there any particular reason canonical used init.d instead of rc.d for startup scripts?

share|improve this question
1  
actually arch linux is the only distro that uses /etc/rc.d that I've seen... I suspect it might be used in bsd. –  xenoterracide Oct 26 '10 at 22:24

4 Answers 4

up vote 8 down vote accepted

Ubuntu uses /etc/init.d to store SysVinit scripts because Ubuntu is based on Debian and that's what Debian uses. Red Hat uses /etc/rc.d/init.d. I forget what Slackware uses. There just isn't a standard location.

Ubuntu is in the process of switching from SysVinit to Upstart, which uses configuration files in /etc/init.

share|improve this answer
1  
Sorry, but /etc/init.d is the standard, as part of the SVR4 standard that Linux start scripts copied. –  Rich Homolka Oct 26 '10 at 23:17
    
Upstart's website claims Ubuntu has been using it since version 6.10 –  badp Jan 16 '11 at 13:05
    
@badp: Though 6.10, still used SysV-style init scripts in /etc/init.d. The transition to /etc/init/*.conf started later (8.04 was still all SysV-style, 10.04 was already transitioning). –  Gilles Jan 16 '11 at 13:33

Historically, the /etc/rc.d directory tree denotes an Init system which follows the 4.4 BSD tradition of system initialization, which is usually called the rc init system. All the modern (Free/Open/Net)BSD system and Slackware Linux follow this tradition.

The /etc/init.d directory tree denotes the System V (SysV) init system which follows the AT&T UNIX, SunOS, Solaris tradition of system initialization. This is commonly called the SysV Init system. Debian proper still follows this tradition in the Wheezy series, but plans to use SystemD in the Jessie series. Historically, RedHat and derivatives have used SysV Init, but don't anymore.

Also, over time, features of both init schemes have been adopted by distributions.

share|improve this answer

Slackware still uses /etc/rc.d

FreeBSD uses /etc/rc.d and /usr/local/etc/rc.d

share|improve this answer

/etc/init.d was the old historical location for SVR4. I forgot why redhat added the /etc/rc.d/ level. I think to isolate things onto rc.d, but then needed to add a bunch of symlinks anyway for backwards compatibility. So there is /etc/init.d in redhat, just it symlinks elsewhere.

So the standard location is /etc/init.d, though it may be a symlink not a real directory.

There were some really old Linux distros that copied BSD with /etc/rc.local but pretty much no one uses that anymore.

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.