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?

link|improve this question

feedback

2 Answers

up vote 2 down vote accepted

How about /sbin/service iptables restart ?

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

"How To Become Root"

link|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
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.