Problem
On boot, Ubuntu hangs for a long time (often up to 2 minutes) displaying a message such as:
[ *** ] A start job is running for Wait for Network to be Configured (1 min 30s / no limit)This delay is caused by systemd-networkd-wait-online.service, which waits until all network interfaces managed by systemd-networkd are considered “online”. On systems where one or more interfaces never come up (e.g. an unused enp* interface, a disconnected cable, or a VM with a misconfigured bridge), the service keeps waiting until its timeout expires, blocking the rest of the boot process.
For most desktop and single-NIC server setups, the wait is unnecessary — the system can continue booting while the network finishes coming up in the background.
Solution
1. Disable and Mask the Service: Primary Fix
Stop the service from running during boot and mask it so dependent services cannot trigger it:
sudo systemctl disable --now systemd-networkd-wait-online.service
sudo systemctl mask systemd-networkd-wait-online.serviceTo verify, run systemctl status systemd-networkd-wait-online.service and confirm that the status output displays loaded (masked...) and inactive (dead):
● systemd-networkd-wait-online.service - Wait for Network to be Configured
Loaded: loaded (/lib/systemd/system/systemd-networkd-wait-online.service; masked; vendor preset: enabled)
Active: inactive (dead)Masking (rather than just disabling) is important because some services declare a Wants= or Requires= dependency on systemd-networkd-wait-online.service. A masked unit cannot be activated by any other unit, so the wait is guaranteed not to run.
2. Alternative: Only Wait for Required Interfaces
If you do need the wait-online behavior but want to avoid the boot delay for interfaces that never come up, configure the service to wait only for specific interfaces instead of all of them:
sudo systemctl edit systemd-networkd-wait-online.serviceIn the editor, add an override that limits the wait to the interfaces you actually care about (e.g. your primary NIC eth0):
[Service]
ExecStart=
ExecStart=/lib/systemd/systemd-networkd-wait-online --interface=eth0 --anyThe empty ExecStart= line is required — it clears the original ExecStart before redefining it. The --any flag makes the service succeed as soon as the listed interface is online, rather than waiting for all interfaces.
Reload systemd and reboot to apply the change:
sudo systemctl daemon-reload3. Alternative: Reduce the Timeout
If you prefer to keep the service active but stop it from blocking the boot for too long, lower its timeout instead of disabling it:
sudo systemctl edit systemd-networkd-wait-online.service[Service]
TimeoutStartSec=5sudo systemctl daemon-reloadThis keeps the wait-online guarantee but caps the delay at 5 seconds, so a missing interface only costs a few seconds of boot time instead of minutes.