CENTOS7 Execute Ifconfig Error Resolution method

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.