Posts Tagged ‘ifconfig’
Ifconfig command not found error
February 6, 2013
Leave a comment
If you type in the console of a CentOS or Oracle Linux ifconfig command, you may get command not found error.
Of course, this doesn’t mean that this command really doesn’t exists, it just means that the shell can not find it on your PATH to execute it.
To check your path, type
echo $PATH
Folder /sbin/ won’t be there, and that is the reason for command not found error.
So, you can try to locate ifconfig with
[user@host ~]$ whereis ifconfig
ifconfig: /sbin/ifconfig /usr/share/man/man8/ifconfig.8.gz
Why whereis command for this?
Because it searches binary, source and man pages for a input.
And now, for getting your IP settings just type
/sbin/ifconfig
Other way is to add /sbin/ to your PATH ( PATH=$PATH:/sbin:/usr/sbin/ ) and just type ifconfig. 😉
Categories: Linux
centos, command not found, ifconfig, not found, oracle linux