Can I enable DHCP4on all interfaces globally without knowing the interface names with netplan? I might add any USB connected ethernet NIC, and I just want any of them to get the network config via DHCP4. I know it works with NetworkManager. But I would rather use the networkd renderer.
41 Answer
It is possible to enable wifi on an interface without knowing the exact interface name by using the match syntax:
network: version: 2 renderer: networkd ethernets: alleths: match: name: en* dhcp4: trueBe sure to avoid any settings that would collide between multiple interfaces (and do not use set-name).