Home >Operation and Maintenance >Linux Operation and Maintenance >Solution to the problem of being unable to connect to the Internet after Centos7 is installed

Solution to the problem of being unable to connect to the Internet after Centos7 is installed

巴扎黑
巴扎黑Original
2017-06-23 14:11:552449browse

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:

/etc/sysconfig/network-scripts /

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:

service network restart

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn