| created | 2025-12-22 | ||||
|---|---|---|---|---|---|
| tags |
|
||||
| aliases |
|
Guide to configuring systemd-networkd for network management in Homelab environments.
Bring USB tethering internet up on Ubuntu minimal using:
systemd-networkdsystemd-resolved- no editor
- no NetworkManager
- no ping
(Android -> USB tethering ON)
Plug the USB cable.
ls /sys/class/net/You'll see something like:
lo usb0
or:
lo enx...
Remember the interface name (we'll call it
USB_IFACE)
Considering you have installed Alpine, Ubuntu minimal or any other minimal server image
Replace USB_IFACE with your actual interface name.
sudo mkdir -p /etc/systemd/networksudo sh -c 'cat> /etc/systemd/network/10-usb.network <<EOF
[Match]
Name=USB_IFACE
[Network]
DHCP=yes
EOF'sudo systemctl enable --now systemd-networkd
sudo systemctl enable --now systemd-resolvedLink DNS resolver:
sudo ln -sf /run/systemd/resolve/stud-resolv.conf /etc/resolv.confsudo networkctl reload
sudo networkctl up USB_IFACECheck status:
networkctl status USB_IFACETry reaching Ubuntu archive:
getnet hosts archive.ubuntu.com