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.