Home  >  Article  >  Operation and Maintenance  >  How to access the Internet in centos7 under a virtual machine

How to access the Internet in centos7 under a virtual machine

王林
王林Original
2020-04-02 10:40:506382browse

How to access the Internet in centos7 under a virtual machine

1. Open the network card configuration file

How to access the Internet in centos7 under a virtual machine

Enter text insertion editing mode.

Focus on setting BOOTPROTO=dhcp and ONBOOT=yes.

How to access the Internet in centos7 under a virtual machine

After modification, press the Esc key first, then the : key, then enter wq, and finally press the Enter key to exit the vim editor.

2. Under the host, press the win R key and enter services.msc to open the windows service.

Make sure that VMware DHCP Service and VMware NAT Service are both enabled.

How to access the Internet in centos7 under a virtual machine

3. Enter

service network restart

in the virtual machine terminal to restart the network and access the Internet.

Related tutorial recommendations: centos tutorial

The above is the detailed content of How to access the Internet in centos7 under a virtual machine. 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