Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, Please excuse my primitive question as I'm obviously a Linux beginner. I have CentOS installed on a server, and I'm wondering what's the difference betwen those two directories? As ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2006
    Posts
    1

    Arrow Difference between /etc/init.d/ and /etc/rc.d/init.d/?


    Hi,

    Please excuse my primitive question as I'm obviously a Linux beginner.
    I have CentOS installed on a server, and I'm wondering what's the difference betwen those two directories?

    As I understand, both the directories contains scripts that run when the machine is booted? So if I simply don't want a service to run on startup, I just remove the appropriate file? Is that how it goes?

    I'd be very much appreciative of any help.

    Cheers

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    It would be good to study the init process in detail.

    http://www.linuxtopia.org/online_boo...n-process.html

    Centos apparently uses the sysV style init, and this determines where they
    put stuff. It would also be good to find if there is some kind of "front end"
    program for controlling services until you are sure you understand, before
    attempting to edit any of the default scripts. It's frightfully complicated.

  3. #3
    Linux User
    Join Date
    Aug 2006
    Location
    Croydon, PA
    Posts
    392
    Quote Originally Posted by zmaHP
    Hi,

    Please excuse my primitive question as I'm obviously a Linux beginner.
    I have CentOS installed on a server, and I'm wondering what's the difference betwen those two directories?

    As I understand, both the directories contains scripts that run when the machine is booted? So if I simply don't want a service to run on startup, I just remove the appropriate file? Is that how it goes?

    I'd be very much appreciative of any help.

    Cheers
    NO!
    Do not remove files unless you know exactly what you are doing.
    To stop a service run chkconfig
    Or to see what is running at startup run :chkconfig --list
    Do a man chkconfig to see how to use it.
    If you know a service is running know and you want to stop it do:
    service <service name like nfs> stop

    Learn to use the Linux services via chkconfig.

    Good Luck,
    Ski

  4. #4
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    If you're just wanting to stop certain services like sendmail or the like, you could also do as su:
    Code:
    system-config-services
    ...which is the Red Hat utility for editing services. I agree with Skiboy that it is dangerous to remove files from "init" unless you know exactly what you are doing.
    Linux Mint + IceWM Registered: #371367 New Members: click here

  5. #5
    Just Joined!
    Join Date
    May 2009
    Posts
    1

    Yeah but. . . Difference betwee /etc/init.d/ and etc/rc.d/init.d is?

    I've seen and reviewed the various methods for starting and stopping services but I'm still wondering why the two paths exist?

    Are the two paths and the script links necessary for chkconfig? Or is it a remnant of a previous Unix/Linux filesystem standard?

    invoking the scripts directly from either path seems to work. . .

    Thanks. . .

  6. #6
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,393
    Quote Originally Posted by user9 View Post
    I've seen and reviewed the various methods for starting and stopping services but I'm still wondering why the two paths exist?

    Are the two paths and the script links necessary for chkconfig? Or is it a remnant of a previous Unix/Linux filesystem standard?

    invoking the scripts directly from either path seems to work. . .

    Thanks. . .
    /etc/init.d is the official location for placing start up scripts and most, but not all distros follow this convention. /etc/rc.d/init.d is where Red Hat places startup scripts, but in order to comply with modern convention, they make /etc/initd a symlink to /etc/rc.d/init.d.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •