Enter this command line static network configuration: the
steps are as follows:
![Insert picture description here](https://img-blog.csdnimg.cn/20201002142612632.png#pic_center
Static IP defines its own IP
Netmask fixed format 255.255.255.0
Default gateway IP subnet mask must be the same as in the screenshot below
DNS fixed format 8.8.8.8
Then click OK and save it all the time.
View the unique representation of the virtual machine (MAC address):
MAC address needs to be recorded in detail (very critical) ! ! !
Modify the file vi /etc/sysconfig/network-scripts/ifcfg-eth0
Finally restart the system and ping www.baidu.com to see if the ping works