Some do...some don't work.

ifconfig
-bash: ifconfig: command not found
link|improve this question

1  
What kind of machines are they? What distro? – blauwblaatje Nov 1 '09 at 2:20
3  
Note that that error message indicates that the program couldn't be found, not that it didn't work. (There's a difference) – David Zaslavsky 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
feedback

3 Answers

up vote 11 down vote accepted

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

/sbin/ifconfig

link|improve this answer
5  
You can also modify your PATH variable to include /sbin directory. – Misha M Nov 1 '09 at 2:39
feedback

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.

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

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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