centos7.5修改网卡名称:

发布时间:2020-04-09 10:48:06 作者:小精灵linux
阅读:340
Centos服务器限时活动,0元免费领! 查看>>

1、修改网卡名称:

sed -i 's/^NAME.*$/NAME=eth0/g' ifcfg-ens33 

centos7.5修改网卡名称:

sed -i 's/DEVICE.*$/DEVICE=eth0/g' ifcfg-ens33

centos7.5修改网卡名称:

2、获取网卡物理地址

[root@centos7 rules.d]# ifconfig ens33 |grep ether |awk '{print $2}'

00:50:56:33:a8:d4

centos7.5修改网卡名称:

[root@centos7 rules.d]# ifconfig ens33 |grep ether |awk '{print $2}'

00:50:56:33:a8:d4

centos7.5修改网卡名称:

3、添加 网卡配置文件,添加物理地址

sed -i '/BOOTPROTO/a\HWADDR='$mac ifcfg-ens33 

centos7.5修改网卡名称:

centos7.5修改网卡名称:

centos7.5修改网卡名称:

4、修改网卡配置文件

centos7.5修改网卡名称:

5、

[root@centos7 network-scripts]# sed -i 's/rhgb/net.ifnames=0 biosdevname=0 &/' /etc/default/grub 

[root@centos7 network-scripts]#  grub2-mkconfig -o /boot/grub2/grub.cfg

centos7.5修改网卡名称:

6、删除70-persistent-ipoib.rules

[root@centos7 rules.d]# pwd

/etc/udev/rules.d

[root@centos7 rules.d]# rm -f  70-persistent-ipoib.rules

7、重启虚拟机:reboot

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读:
  1. linux系统修改网卡名称为eth0
  2. Centos 7 修改网卡名称

开发者交流群:

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

centos7.5修改网卡名称: ce tos

上一篇:redis服务器开启远程连接的步骤

下一篇:c语言中printf用法及其函数定义

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》
开发者交流群×