Archlinux下修改网卡名称

刚刚安装了Archlinux,用的archlinux-2013.03.01-dual.iso镜像,最新的systemd将网卡名更改了,不在是原来默认的eth0/wlan0

我的ifconfig -a输出如下:

enp9s0: flags=4098 mtu 1500
ether 04:7d:7b:f8:25:9d txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 0 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlp3s0: flags=4098mtu 1500
ether 88:9f:fa:f8:c3:06 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0</pre> 

怎么将网卡名改回原来的eth0/wlan0呢?如下操作即可:

#cd /usr/lib/udev/rules.d/
#mv 80-net-name-slot.rules 80-net-name-slot.rules.bak

如果/usr/lib/udev/rules.d/目录没有如上文件,那就在/etc/udev/rules.d/找,完成后重启电脑即可!