Ifconfig command is to set or display the network interface program, can display our machine's network card information, but sometimes minimize the installation of the Linux distribution such as CentOS will not install the ifconfig, such as the default, when you enter the terminal, Error running ifconfig command
This is the first thing we will think of is not the environment variable in the path of the Ifconfig command, because Ifconfig is in the/sbin path, the root user login to run, but we are on top of the root user login Ah, no hurry, we look at the root user environment variables
See no, our environment variable has/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 result shows that there is no ifconfig command in our/sbin directory, so our conclusion is: There is no installation in our CentOS ifconf
——————————————— dividing line is an attitude ———————————————
Our solution is: Yum installs ifconfig this command pack
See, Bash also has a split line, of course, this is not the focus, the focus is the Yum Search this command we found ifconfig This command is in net-tools.x86_64 this bag, then we install this package is OK
This is the command we have installed Ifconfig, let's try it.
Successfully run, this time you are not as I had doubts, Windows ipconfig command to the Linux why things are not necessary to install, Bo Master looked at the information, the original Ifconfig command from Net-tools, this bag has ifconfig , Netstat,whois and other commands, so you can't run these commands before.
CentOS Mini version, no ifconfig command installed