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.

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 ????

share|improve this question
    
ls -la /etc/init.d/network what is the output ? in CentOS you should be able to call any service using service service_name command (you don't actually need the /etc/init.d/) service is merelly an agent that will simplify your services commands. Also are you using a remote user to get to root or physical access ? if you are using a user make sure you are moving to root with the follow command su - or su - root –  Prix Aug 25 '10 at 18:57
    
@Prix - using sudo i the better way to go instead of escalating to a full root shell. –  Zypher Aug 25 '10 at 19:27
    
The output of ls -la /etc/init.d/network is -rwxr-xr-x 1 root root 8257 Jul 4 2009 /etc/init.d/network and yes i did tried sudo but nothing is happening. –  user52337 Aug 26 '10 at 8:11
add comment

1 Answer

You're probably not root when you're running /etc/init.d/network restart. It should work the same as service network restart (note that service is not prefixed with /etc/init.d).

share|improve this answer
    
I am the root user... –  user52337 Aug 26 '10 at 8:15
    
Do you see anything in /var/log/messages after you run the command? That's very strange that you see no output whatsoever. –  vmfarms Aug 26 '10 at 13:38
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.