Find the answer to your Linux question:
Results 1 to 4 of 4
I am recently learning about linux (Cent OS) and i came across to a weird problem. I am going through a chapter "Managing Services" and in the book its written ...
  1. #1
    Just Joined!
    Join Date
    Nov 2009
    Posts
    7

    Restarting service issue

    I am recently learning about linux (Cent OS) and i came across to a weird problem. I am going through a chapter "Managing Services" and in the book its written to restart a network i should use the below command

    /etc/init.d/network restart

    But when i am using the above command nothing is happening. Instead when i use this command "/etc/init.d/service network restart", i am able to restart. Could anyone explain what is the difference ????

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    the first command should work, but typically on redhat based distro you will just use service command to do the work, like service network restart

  3. #3
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    623
    And in fact, the second command "/etc/init.d/service network restart" should not work, unless for some reason you've copied the /sbin/service binary to /etc/init.d. The command should be as coopstah gives it, or fully qualified as /sbin/service network restart.

  4. #4
    Just Joined!
    Join Date
    Jan 2008
    Posts
    17
    service is a wrapper for the scripts in /etc/init.d/. It makes the interface consistent and provides an interface to manage multiple services at the same time.

Posting Permissions

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