Solve the problem that Linux can’t be connected to the Internet under VMware virtual machine

Time:2021-3-26

stayadministratorsThe user logs into the Linux system and opens the terminal.(administrator, administrator, administrator)

The first step is to modify
Input: VI / etc / sysconfig / network scripts / ifcfg-eth0
1. Modify onboot = no to yes
2. Change bootproto = DHCP to static
Then (Ctrl + C, shift +;) save and exit, and write: WQ in the terminal

The second part adds two articles
Input: VI / etc/ resolv.conf
1、nameserver 100.198.199.200
2、nameserver 8.8.8.8
Then (Ctrl + C, shift +;) save and exit, and write: WQ in the terminal

Add one article to the third part
Input: VI / etc / sysconfig / network
1、GATEWAY=192.1.14.254

Then (Ctrl + C, shift +;) save and exit, and write: WQ in the terminal

And then you can spell it out
ping www.baidu.com You can ping