CentOS 7将网卡名称eno16777736改为eth0

  编辑文件/etc/sysconfig/grub 

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

  在尾部添加

1
net.ifnames=0 biosdevname=0

  执行命令

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

  重启主机

1
init 6

  修改网卡配置文件

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

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

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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 @   minseo  阅读(288)  评论(0编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
点击右上角即可分享
微信分享提示