Linux cannot execute ifconfig command __linux

Source: Internet
Author: User

Ifconfig command is to set or display the network interface of the program, can display our machine's network card information, but sometimes minimize the installation of CentOS and other Linux distributions will not install the default ifconfig and other commands, when you enter the terminal, Run the ifconfig command and there will be an error

This is the first thing we will think is not the environment variable there is no ifconfig command path, because the ifconfig is in the/sbin path, the root user login to run, but we are the top of the root user login Ah, no hurry, we look at the root user environment variables

See, our environment variables have/sbin this path, also said that if the ifconfig command exists and is located in the/sbin directory, we must be able to run, then we will see/sbin directory there is no ifconfig command it

The results show that our/sbin directory does not have the ifconfig command, so our conclusion is that there is no installation in our CentOS ifconf

——————————————— dividing line is an attitude ———————————————

Our solution is: Yum install ifconfig this command pack

See, Bash also has a split line, of course it's not the point, the point is that by Yum Search this command we found ifconfig this order is in net-tools.x86_64 this bag, next we install the bag on the line

This is the order we've installed Ifconfig, let's try it.

Successfully run, at this time you are not the same as I have doubts, Windows ipconfig command to the Linux why something is not necessary to install, the blogger looked at the information, the original Ifconfig command from Net-tools, this bag has ifconfig , Netstat,whois and so on, so you're not going to be able to run these orders.

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.