Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Some do...some don't work.

-bash: ifconfig: command not found
share|improve this question
What kind of machines are they? What distro? – blauwblaatje Nov 1 '09 at 2:20
Note that that error message indicates that the program couldn't be found, not that it didn't work. (There's a difference) – David Z Nov 1 '09 at 6:05
I highly suggest getting out of the habit of using 'ifconfig' on Linux machines - it is deprecated in favour of iproute2 (ip <command>) – MikeyB Nov 1 '09 at 17:34
up vote 12 down vote accepted

I think this is when ifconfig is in /usr/sbin which is not in a non-admin user's path. Try:


share|improve this answer
You can also modify your PATH variable to include /sbin directory. – Misha M Nov 1 '09 at 2:39
Worked for me on Debian 7. – its_me Jun 10 '13 at 8:43

Redhat-based distros don't include much in root's path for (imho, misguided) security reasons. Add /sbin;/usr/sbin;/usr/local/sbin to your path, or just memorise where your commands are stored are and specify the paths when running.

share|improve this answer
And, IIRC, neither do Debian based. – user24524 Nov 1 '09 at 15:18
Debian very definitely does Samix. – Lee B Nov 1 '09 at 23:51

If you don't want to add to the path for security reasons (so as not to "expose" all executables in those directories) you could use shell aliases.

share|improve this answer

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.