/etc/sysconfig/network-scripts 里将原网卡文件移走,新建 ifcfg-eth0 文件
[root@centos8 network-scripts]# vim ifcfg-eth0
DEVICE=eth0
NAME=eth0
BOOTPROTO=static
IPADDR=10.0.0.88
PREFIX=24
GATEWAY=10.0.0.2
DNS1=180.76.76.76
DNS2=223.6.6.6
ONBOOT=yes
vim /etc/default/grub
GRUB_CMDLINE_LINUX="crashkernel=auto resume=UUID=5757d252-4d22-44dc-ad4b-2e7445998de2 rhgb quiet net.ifnames=0"
grub2-mkconfig -o /boot/grub2/grub.cfg 后重启