CentOS 7将网卡名称eno16777736改为eth0

  编辑文件/etc/sysconfig/grub 

  如果系统是CentOS Stream则修改文件 /etc/default/grub

  在尾部添加

net.ifnames=0 biosdevname=0

  执行命令

grub2-mkconfig -o /boot/grub2/grub.cfg

  重启主机

init 6

  修改网卡配置文件

  把原/etc/sysconfig/network-scripts/ifcfg-eno1666 修改为ifcfg-eth0

  同理配置文件名字也需要修改

   如果系统是CentOS Stream则修改配置文件

# cat /etc/NetworkManager/system-connections/eth0.nmconnection 
[connection]
id=eth0
uuid=09bcb246-d013-36dd-975b-cac8484af6c4
type=ethernet
autoconnect-priority=-999
interface-name=eth0
timestamp=1699436140

[ethernet]

[ipv4]
#method=auto
method=manual
address1=192.168.3.203/24,192.168.3.1
dns=192.168.3.1;114.114.114.114

[ipv6]
addr-gen-mode=eui64
method=auto

[proxy]

  

 

posted @ 2018-03-07 13:35  minseo  阅读(275)  评论(0编辑  收藏  举报