Ifconfig command not found

I just installed CentOS7 as a virtual machine on my mac (osx10.9.3 + virtualbox) Running ifconfig returns a 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?

In addition, I do not yet have an Internet connection in the virtual machine, perhaps this is a factor.

Please keep in mind that I am a student and very new to certain terminology.

+7
source share
4 answers

ifconfig net-tools, ;

sudo yum install net-tools

, /sbin/ifconfig.

+25

RHEL, CentOS. . :

vi ~/.bashrc

i, . :

export PATH=$PATH:/sbin

Vi :wq!

, .

source ~/.bashrc

ifconfig, .

+18

ifconfig , ​​ .

ip address

ip a

:)

+7

( ) ( ), CD/DVD SCSI CentOS ISO. . :

mount /dev/cdrom /mnt

You can access packages from ISO through:

cd /mnt/Packages
find . -name "net-tools"

You must have at least one result that returns <net-tools-filename>.rpm, for example net-tools-2.0-0.22.20131004git.el7.x86_64.rpm. Install using this rpm file:

yum install <net-tools-filename>.rpm

Type y when prompted by " Is this okay [y/d/N]:" and submit. After the installation is complete, you will be fine with the second ifconfigcommand ifconfig.

0
source

All Articles