ubuntu下修改网卡名称
2012-08-08 14:31
225 查看
修改/etc/udev/rules.d中的配置文件,根据不同人的电脑那个数是不一样的,在我的机器中是70-persistent-net.rules这个名字,用文本工具打开后看到里面包含如下语句:
# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="*", NAME="eth0"
这一段话可能在这个配置文件中出现多次,我们删除所有的NAME不是“eth0”的,然后按照我红色字的部分把原来的mac地址改为“*”号,这样以后启动计算机机器的网卡设备名就不会再变来变去了。
按照这个方式你也可以把网卡设备名称改为你喜欢的。
# This file maintains persistent names for network interfaces.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# file; however you are also free to add your own entries.
# PCI device 0x10ec:0x8167 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1c:c4:84:db:ff", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x1106:0x3106 (via-rhine)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:40:05:46:69:f2", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x10ec:0x8169 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1d:0f:20:23:11", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:16:17:2b:84:4e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
# PCI device 0x10ec:0x8167 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:78:a5:1e:9e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"
可以查找你的网卡mac地址后,定义一下NAME= 多少就行了
====
http://hi.baidu.com/hanovo/blog/item/fbb81a300d60d19fa9018ea8.html
# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="*", NAME="eth0"
这一段话可能在这个配置文件中出现多次,我们删除所有的NAME不是“eth0”的,然后按照我红色字的部分把原来的mac地址改为“*”号,这样以后启动计算机机器的网卡设备名就不会再变来变去了。
按照这个方式你也可以把网卡设备名称改为你喜欢的。
# This file maintains persistent names for network interfaces.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# file; however you are also free to add your own entries.
# PCI device 0x10ec:0x8167 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1c:c4:84:db:ff", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x1106:0x3106 (via-rhine)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:40:05:46:69:f2", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x10ec:0x8169 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1d:0f:20:23:11", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:16:17:2b:84:4e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
# PCI device 0x10ec:0x8167 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:78:a5:1e:9e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"
可以查找你的网卡mac地址后,定义一下NAME= 多少就行了
====
http://hi.baidu.com/hanovo/blog/item/fbb81a300d60d19fa9018ea8.html
相关文章推荐
- 嵌入式 ubuntu下修改网络设备名称以及hi3518c平台jffs2文件系统中获取当前无线网卡设备
- linux ubuntu操作系统修改网卡名称为ethx的方法
- ubuntu下修改网卡名称
- Ubuntu16.04 修改网卡名称为wlan0/eth0
- UBUNTU 修改网卡名称 更改设备网卡名称 修改ENO16777736为ETH0 UBUNTU 15.10网卡名称为ENO16777736(http://www.cnphp6.com/archiv)
- ubuntu 修改网卡名称 更改设备网卡名称 修改eno16777736为eth0 ubuntu 15.10网卡名称为eno16777736
- 修改Ubuntu网卡名称
- ubuntu修改网卡名称为eth0
- ubuntu16.04修改网卡名称enp2s0为eth0
- ubuntu 修改网卡名称enp5s0 eth0
- ubuntu (linux)修改网卡名称命令
- CentOS 7修改网卡名称
- Ubuntu: 修改文件(夹) 名称
- centos把网卡名称修改为eth0的方法
- centos7修改网卡名称、网卡双网卡绑定
- rhel7修改网卡名称
- CentOS7修改网卡名称为eth0
- 关于“Ubuntu所有文件都出现在桌面“或者“UBUNTU根目录中文文件夹修改为英文名称“等问题的解决方案
- Ubuntu下更改网卡名称
- Centos7修改网卡设备名称