根据 Netplan 文档,通过 MAC Address 匹配设备,然后修改名称:
network:
ethernets:
eth0:
match:
macaddress: b4:05:5d:02:d5:6c
set-name: eth0
eth1:
match:
macaddress: b4:05:5d:02:d5:6d
set-name: eth1
fibre0:
match:
macaddress: b4:05:5d:02:d5:6a
set-name: fibre0
fibre1:
match:
macaddress: b4:05:5d:02:d5:6b
set-name: fibre1
version: 2
参考文献
networking – How to rename a network interface in 20.04 – Ask Ubuntu