https://blog.csdn.net/b3325/article/details/93621054
In the home computer, the first time vm virtual machine,
Virtual machine CentOS7 system, when ifconfig command to query IP, found that only ens33, no eth0, and ens33 has not ip address, even in Ping ping Baidu also not informed of the name or service not known.
After Baidu, we addressed in this article the following:
https://www.cnblogs.com/achengmu/p/8979257.html
He has permanent and temporary two methods described here is permanent.
1 into the directory / etc / sysconfig / network-scripts /
2. Place the file ifcfg-ens33 rename ifcfg-eth0; (it is recommended to backup) access is not enough, you can switch to the root user su root
3. Edit the ifcfg-eth0
Only need to modify a parameter can be, other fixed
The NAME = ens33 changed NAME = eth0 and DEVOCE = eth0 and ONBOOT = yes
(This is a dynamic IP, IP can become once the restart, I use dynamic)
PS:
Static, then you need to IPADDR, according to their own network change, BOOTPROTO must be changed to static.
4. Modify the grub file
Directory: / etc / default
Grub edit files, back up
Use instruction: vi grub
GRUB_CMDLINE_LINUX behind the original argument plus "net.ifnames = 0 biosdevname = 0"
Save and exit
The command line to run commands
grub2-mkconfig -o /boot/grub2/grub.cfg
6. Restart the computer
reboot