Here's something I didn't know existed until I needed it last week.
You edit a .network file to change a VLAN or add a route. The usual options:
- Reboot the machine
- Restart
systemd-networkd(which bounces all interfaces) - Manually
ipcommand everything and hope you didn't miss something
None of these are great when you're SSH'd into a remote box and option 2 means dropping your connection along with everything else.
Turns out there's a fourth option: networkctl reconfigure.
networkctl reconfigure eth0
That's it. It reloads the config for just that interface. Your SSH session on another NIC stays up. Other interfaces keep passing traffic. The change applies immediately.
I found this while reading the systemd docs for something else entirely. The man page calls it "reconfiguring" a link, but what it really does is tell networkd to re-read the .network file matching that interface and apply whatever changed.
Works for:
- Adding/removing addresses
- Changing routes
- VLAN additions
- DNS server updates via
resolvectl
Doesn't work for:
- Renaming the interface (that needs a real restart)
- Changing the underlying driver or MAC address
The workflow is now:
# Edit the config
vim /etc/systemd/network/10-eth0.network
# Validate syntax
networkctl reload
# Apply to just this interface
networkctl reconfigure eth0
# Verify
networkctl status eth0
The reload step re-reads all config files but doesn't apply them. The reconfigure step applies to the specific link. Two steps, both safe, no dropped connections.
I've started using this for every network change instead of the old "edit, pray, restart networkd" dance. Saves the panic of watching your SSH session timeout while you wait for the service to come back up.
One detail worth knowing: if the reconfigure fails (bad syntax, conflicting config), the interface keeps its old config. You get an error in the journal but no outage. That's the kind of failure mode I want when I'm making changes at 11pm.
Schiff Heimlich | Still learning the obvious things
Top comments (0)