0

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?

Kev
  • 984
  • 4
  • 23
  • 46

2 Answers2

4

"How To Become Root"

Ignacio Vazquez-Abrams
  • 45,939
  • 6
  • 79
  • 84
  • 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 02 '10 at 17:26
  • I had tried `sudo service iptables restart` and gotten the same message. Sorry, I forgot to mention that. – Kev Dec 02 '10 at 17:49
  • @Kev: Did you read the article? – Ignacio Vazquez-Abrams Dec 02 '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 02 '10 at 17:52
2

How about /sbin/service iptables restart ?

MadHatter
  • 79,770
  • 20
  • 184
  • 232