您的位置:首页 > 其它

ubuntu下修改网卡名称

2015-11-03 10:53 375 查看
Ubuntu下把网卡eth0修改为eth1的步骤:

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

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x11ab:/sys/devices/pci0000:00/0000:00:1c.1/0000:02:00.0 (sky2)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:11:43:c7:86",
ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"


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

3、重启网络服务 sudo /etc/init.d/networking restart,大功告成!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: