Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Pages like this say that you can

service iptables restart

...but I get a command not found error. I tried yum install service but there's no such package.

How do I restart services?

share|improve this question
up vote 2 down vote accepted

How about /sbin/service iptables restart ?

share|improve this answer
sudo in front of that worked. Thanks! – Kev Dec 2 '10 at 17:51

"How To Become Root"

share|improve this answer
Good point. I'd sort of assumed he had become root with "/bin/su" not "/bin/su -", so lacked the PATH. If that's true, my answer is probably more immediately helpful, but yours is way better in the long run. – MadHatter Dec 2 '10 at 17:26
I had tried sudo service iptables restart and gotten the same message. Sorry, I forgot to mention that. – Kev Dec 2 '10 at 17:49
@Kev: Did you read the article? – Ignacio Vazquez-Abrams Dec 2 '10 at 17:50
Ah, I see it does answer the question, in "The reason is that regular system users and the root user have different PATH environment variables (you can view a users PATH with 'echo $PATH')." However, the other answer got it working for me much quicker. :) (I still gave +1 to you...) – Kev Dec 2 '10 at 17:52

Your Answer


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.