安裝系統後預設的網卡名稱為 enpXX ,修改為熟悉的eth0
1 vi /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet net.ifnames=0 biosdevname=0"
GRUB_DISABLE_RECOVERY="true"
追加 net.ifnames=0 biosdevname=0
2 mv /etc/sysconfig/network-scripts/ifcfg-enpXX /etc/sysconfig/network-scripts/ifcfg-eth0
及檔案裡面的 name 、device屬性的名稱為eth0
3 grub2-mkconfig -o /boot/grub2/grub.cfg
4 reboot
5 ip a 檢視