How to automatically generate a netplan .yaml file?
Repurposing an old laptop for Ubuntu test server. No Ethernet port.
Installed Ubuntu server from thumb drive then searched for *deb packages to make WiFi work, copied them to thumb drive and installed. WiFi works. Have connectivity.
Have gotten USB Ethernet dongle so don't need to run WiFi. When connected the dongle has link and activity light however ip -br a
shows the Ethernet interface down and no IP address.
Am in very early stages of experimenting with the server. Even so would prefer not to start install again just to get a netplan .yaml for the Ethernet dongle.
What I would like to learn is how to "automatically" generate a .yaml file. Similar to what happens during install, how to generate a .yaml that includes the Ethernet dongle?
Any suggestions where to look or good search fu to find the information?
All searches I've tried with terms "netplan generate yaml" or "netplan create yaml" or variations lead me back to the netplan generate...
command which seems is definitely NOT what I'm looking for.
p.s. I've confirmed the USB Ethernet is detected and handled properly by booting the laptop from a thumb drive with Ubuntu desktop 22.04. The Ethernet dongle is detected and gets a DHCP address. The WiFi is not detected, still need those separate .debs.
p.p.s. The netplan .yaml generated by the 22.04 desktop boot is simple...
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
Suggestions how to make Ubuntu create/modify the existing netplan .yaml to incorporate the USB Ethernet dongle?
Yes, I can edit it. But I'd like to figure out how to make Ubuntu do the work.