ubuntu下修改网卡名称

Ubuntu下把网卡eth0修改为eth1的步骤:

1、打开配置文件 /etc/udev/rules.d/70-persistent-net.rules,文件内容如下:

[plain] view plain copy
  1. # This file was automatically generated by the /lib/udev/write_net_rules  
  2. # program, run by the persistent-net-generator.rules rules file.  
  3. #  
  4. # You can modify it, as long as you keep each rule on a single  
  5. # line, and change only the value of the NAME= key.  
  6.   
  7. # PCI device 0x11ab:/sys/devices/pci0000:00/0000:00:1c.1/0000:02:00.0 (sky2)  
  8. SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:11:43:c7:86",   
  9. ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"  

 

2、修改文件,将 NAME=“eth0” 修改为 eth1。

3、重启网络服务 sudo /etc/init.d/networking restart,大功告成!

转载于:https://www.cnblogs.com/wanghuixi/p/8901255.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值