After installation is complete Centos7 minimum, ifconfig command does not take

Original link: https://www.cnblogs.com/cy60/p/9287856.html

After installation is complete Centos7 minimum, ifconfig command to take.

1. Question: just minimal installation finished centos7, I want to see the local IP address. Then run ifconfig, the results of the pop-up error.

2. Troubleshooting: First, we understand whether or not the card is not open due? We can look to troubleshoot by three methods;

  1) by ping about Baidu to know whether the network adapter is enabled

    

 

 2) to determine whether the card is enabled by entering the ip addr see if you can obtain an IP address

    

 3) by cat / etc / sysconfig / network-scripts / ifcfg-enp0s3 (ifcfg-enp0s3 is the name of the card, different machines are not the same.) NBOOT at whether to open (meaning that the card is turned on).

    

3. Troubleshooting Conclusion

   1) can ping, it indicates that the card has enabled, and can obtain an IP address to the Internet. (If not by vi / etc / sysconfig / network-scripts / ifcfg-enp0s3, ONBOOT to yes.BOOTPROTO to the DHCP, or manually to obtain an IP address, see Network disposed centos7) Note: After modification need to restart the network card (command: service network restart)

   2) can be found through ip addr IP address obtained prove that the card is enabled. If you can not get modify the network configuration file. Note: After modification need to restart the network card (command: service network restart)

   3) / sysconfig / network-scripts / ifcfg-enp0s3 see if the card is enabled by cat / etc, if not used vi / etc / sysconfig / network-scripts / ifcfg-enp0s3 modify the network configuration file.

   Summary: Then you can determine there is no ifconfig related tools installed.

4. Use the yum provides ifconfig to see that package to improve ifconfig, and install it.

  

  Then execute yum install net-tools

  

  Then enter: ifconfig command to test

  

  In this version it can show net-tools package, and can view information about the IP address associated.

Guess you like

Origin blog.csdn.net/f2157120/article/details/100799808