CentOS7修改网卡为eth0
作者:Eric 微信:loveoracle11g 编辑网卡信息 [root@linux-node2 ~]# cd /etc/sysconfig/network-scripts/ [root@linux-node2 network-scripts]# mv ifcfg-eno16777728 ifcfg-eth0 [root@linux-node2 network-scripts]# grep eth0 ifcfg-eth0 NAME=eth0 DEVICE=eth0 修改grub [root@linux-node2 ~]# grep GRUB_CMDLINE_LINUX /etc/sysconfig/grub GRUB_CMDLINE_LINUX="crashkernel=auto rhgb net.ifnames=0 biosdevname=0 quiet" 生成启动菜单 [root@linux-node2 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg 验证是否修改成功 [root@linux-node2 ~]# reboot [root@linux-node2 ~]# yum -y install net-tools [root@linux-node2 ~]# ifconfig eth0 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.56.12 netmask 255.255.255.0 broadcast 192.168.56.255 inet6 fe80::20c:29ff:fec2:c65b prefixlen 64 scopeid 0x20<link> ether 00:0c:29:c2:c6:5b txqueuelen 1000 (Ethernet) RX packets 200095 bytes 237795731 (226.7 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 164306 bytes 316036725 (301.3 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0