During the boot sequence of an Ubuntu Server, systemd initiates dozens of services in parallel to minimize startup time. However, certain services are configured to block the boot process until specific conditions are met. The systemd-networkd-wait-online.service is one such service; its sole purpose is to pause the boot sequence until all configured network interfaces are fully active and hold a routable IP address. While useful for servers that mount remote file systems (like NFS or iSCSI) at boot, this service can easily add a frustrating 2-minute delay (the default timeout) to your boot time if an unused ethernet port is unplugged or a DHCP server is slow to respond.
This guide explains how to completely disable the systemd-networkd-wait-online service in Ubuntu Server to accelerate your boot times.
Disable and Mask the Wait-Online Service
Because other services (like network-online.target) often declare a dependency on this specific service, simply “stopping” it is insufficient. We must explicitly mask it so systemd bypasses it entirely during the critical boot path.
- Log into your Ubuntu Server via SSH or local console using an account with
sudoprivileges. - First, disable the service to prevent it from being called during the normal startup routine:
sudo systemctl disable systemd-networkd-wait-online.service - To absolutely guarantee that no other dependent service can inadvertently trigger it and cause a boot stall, mask the service (this symlinks its unit file to
/dev/null):sudo systemctl mask systemd-networkd-wait-online.service - Optional but recommended: If you are using NetworkManager instead of networkd, you should also disable its equivalent wait service:
sudo systemctl disable NetworkManager-wait-online.servicesudo systemctl mask NetworkManager-wait-online.service
Verify the Boot Path Optimization
The changes are immediate, but you will only observe the benefit during the next system restart.
To verify the optimization, reboot your server (sudo reboot). You should notice a significantly faster time-to-login-prompt, as the kernel will no longer block waiting for a network link state. To confirm the service was skipped post-boot, run the systemd blame tool:
systemd-analyze blame
The output lists all services by the time they took to initialize. systemd-networkd-wait-online.service will be completely absent from this list, confirming that your boot sequence is now strictly non-blocking regarding network connectivity.