ifconfig command not found

RobSeg picture RobSeg · Jul 19, 2014 · Viewed 62.4k times · Source

I've just installed CentOS7 as a virtual machine on my mac (osx10.9.3 + virtualbox) Running ifconfig returns command not found. Also running sudo /sbin/config returns commmand not found. This is echo $PATH

/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/robbert/.local/bin:/home/robbert/bin

Is my path normal? If not, how can I change it?

Also, I don't have an internet connection on virtual machine yet, maybe that's a factor.

Please bear in mind i'm a student and very new to certain terminology.

Answer

Joachim Isaksson picture Joachim Isaksson · Jul 19, 2014

ifconfig exists in the net-tools package which may not be installed by default;

sudo yum install net-tools

When the package is installed, it will exist as /sbin/ifconfig.