问题原文
原帖链接 · Ralf Hildebrandt · CC BY-SA 3.0
Recent version of Ubuntu and Debian (stretch) bring a new network interface naming scheme.
Now, when updating from a system that's using old style names like "eth0", I'd like to know prior to booting what the new name will be.
How can I do this? Is there a magic invocation of "systemd" I can use to edit /etc/network/interface befor booting (and subsequently losing network connectivity)?
社区高分解答
原帖链接 · GnP · CC BY-SA 3.0
There's two different schemes available: biosdevname vs predictable network interface name.
biosdevname
Biosdevname seems to be the default in ubuntu. It is activated by installing the biosdevname package.
The biosdevname of an interface can be found with:
biosdevname -i eth0
Predictable network interface names
I believe this is the default in Debian stretch, but needs to be explicitly enabled on upgrade from previous releases.
The predictable name for eth0 can be found with:
udevadm test-builtin net_id /sys/class/net/eth0 | grep '^ID_NET_NAME_'
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
