RedHat/CentOS 7如何更改网卡名为eth0 eth1......
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了RedHat/CentOS 7如何更改网卡名为eth0 eth1......相关的知识,希望对你有一定的参考价值。
[[email protected] ~]# vi /etc/sysconfig/grub
GRUB_TIMEOUT=5
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/swap crashkernel=auto rd.lvm.lv=rhel/root rhgb quiet net.ifnames=0 biosdevname=0"
GRUB_DISABLE_RECOVERY="true"
[[email protected] ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
[[email protected] ~]# mv /etc/sysconfig/network-scripts/ifcfg-eno16777736 /etc/sysconfig/network-scripts/ifcfg-eth0
[[email protected] ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eth0
UUID=a6b97d26-ff58-4311-8096-240a3565babd
DEVICE=eth0
ONBOOT=no
重启系统即可
以上是关于RedHat/CentOS 7如何更改网卡名为eth0 eth1......的主要内容,如果未能解决你的问题,请参考以下文章