dmesg |grep network
[ 74.261872] systemd-udevd[14259]: renamed network interface wlan0 to wlp2s0
[ 74.391865] systemd-udevd[14259]: renamed network interface eth0 to enp0s4
-
使用原来的网卡名字eth0,重置udev的rules:
# ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
# touch /etc/udev/rules.d/80-net-name-slot.rules
- 使用新的网卡名字
# rm /etc/udev/rules.d/80-net-name-slot.rules
# rm /etc/init.d/net.eth0 #删除不存在的引用
# rc-update delete net.eth0 default #删除不存在的开机启动
# cd /etc/init.d
# ln -s net.lo net.enp0s3
# rc-update add net.enp0s3 default #使用新名字