Software engineering notes

tutorial: fix “iptables: command not found” error on CentOS 5.2

with 8 comments

Goal: enable us to use the iptables command in the terminal



  • CentOS 5.2
  • vi
  • bash


  1. Add /sbin to your path by editing your ~./bash_profile: user $ vi ~/.bash_profile
  2. Append /sbin to the PATH definition.  In my file, this looks like: PATH=$PATH:$HOME/bin –> PATH=$PATH:$HOME/bin:/sbin
  3. Save and close ~/.bash_profile
  4. Reload ~/.bash_profile: user $ source ~/.bash_profile

Written by Erik

August 3, 2009 at 10:54 am

Posted in tutorial

Tagged with ,

8 Responses

Subscribe to comments with RSS.

  1. thanks for your sharing. its saves my time and work.
    thanks again erik


    December 1, 2009 at 11:56 pm

    • I’m happy it was useful 🙂 Happy Holidays


      December 24, 2009 at 2:54 am

  2. Thx man — it really helps a lot —


    June 16, 2010 at 10:00 pm

    • cool. i’m glad it was helpful


      June 29, 2010 at 10:07 am

  3. My suggestion,
    vijay# Export PATH=$PATH:$HOME/bin:/sbin/

    that s it.


    December 20, 2010 at 2:07 am

  4. Thanks a lot, for sharing, I am sharing on my blog…


    May 18, 2011 at 3:56 am

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: