码迷,mamicode.com
首页 > 其他好文 > 详细

RedHat/CentOS 7如何更改网卡名为eth0 eth1......

时间:2019-03-17 12:16:28      阅读:252      评论:0      收藏:0      [点我收藏+]

标签:grub   failure   swap   abd   device   terminal   swa   output   bios   

[root@localhost ~]# 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"

[root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
[root@localhost ~]# mv /etc/sysconfig/network-scripts/ifcfg-eno16777736 /etc/sysconfig/network-scripts/ifcfg-eth0
[root@localhost ~]# 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......

标签:grub   failure   swap   abd   device   terminal   swa   output   bios   

原文地址:https://blog.51cto.com/12510191/2364215

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!