Today, after all the hard work, centos7 was finally installed in the VMware virtual machine. . I was doing a routine yum update with great enthusiasm, but I found that the default network card of the centos system seemed not to be configured properly, and the feedback was that it could not connect to the Internet. After some research, centos was finally connected to the Internet. The method is now announced as follows:
Enter the directory:
Use the ls command to view the network card configuration file name (the network card name seems to be a random number in CENTOS7, so the network card name of each machine is different)
Use vim (or vi, whichever you prefer) to edit the file
Change the ONBOOT=no in the last line to ONBOOT=yes, such as Figure
Finally enter: wq to save and exit, then restart the network:
After testing, you can successfully connect to the Internet
The above is the detailed content of Solution to the problem of being unable to connect to the Internet after Centos7 is installed. For more information, please follow other related articles on the PHP Chinese website!