Where Does systemd-networkd Read Config From?
systemd-networkd reads .network, .netdev, and .link files from /etc/systemd/network in lexical order.
Last updated
systemd-networkd configures links from drop-in files in /etc/systemd/network. Match sections select interfaces by name or MAC, and Network sections set addresses, gateways, and DHCP. Netdev files define bridges, bonds, and VLANs beside them.
Priority follows strict lexical order across three directories. System files ship in /usr/lib, admin overrides belong in /etc, and runtime files land in /run. Debugging starts with networkctl, which shows which file configured each address.
Where systemd-networkd stores this, by platform
/etc/systemd/network
Admin owned .network, .netdev, and .link files. Later filenames win on conflicts. Validate with networkctl status after edits.
Frequently asked questions
Which systemd-networkd file wins?
Later filenames win on conflicting keys, so name custom files to sort after distro ones. Check effective config with networkctl status on the interface. Keep one concern per file.
Can I copy networkd config between machines?
Yes. Drop the same files into /etc/systemd/network and enable systemd-networkd. Formats match across distros. Reload with networkctl reload and confirm addresses.
Notice an outdated path? Let us know.