Today in the free time on the VirtualBox installed CentOS virtual machine, login to the root user after the habitual execution of the ifconfig command, found that prompted the error
Helpless under the use of Niang, found a solution, here to provide a link
Http://www.centoscn.com/CentosBug/osbug/2014/0916/3750.html
Then on their own virtual machine to carry out the experiment, modify the error, summarize the document.
According to the documentation prompts, we would think that there is no path to the config command in the environment variable because the ifconfig is under the/sbin path and is logged in as the root user to run.
So let's take a look at the root user's environment variables
At this point, we can see that the environment variable exists/sbin this path, that is, if the ifconfig command exists and is located in the/sbin directory, we can certainly run, then we look at the/sbin directory there is no ifconfig command
The results indicate that there is no ifconfig command in the/sbin directory, so our initial version CentOS is not installed Ifconfig
————————————————————— the legendary dividing line ——————————————————————————
The solution is: Yum install ifconfig this command pack
And then we'll find out that ifconfig This command is in the net-tools.x86_64 package, and then we'll install the package.
Yum Install net-tools.x86_64
Now let's test ifconfig if this command has been installed.
Run successfully, here, our ifconfig command has been installed to complete, in addition, Ifconfig command from Net-tools, this bag has Ifconfig,netstat,whois commands, is indispensable.