Disable systemd-networkd-wait-online.service in Ubuntu Server

In Ubuntu Server, the systemd-networkd-wait-online.service is responsible for waiting until the network is fully online before allowing the boot process to continue. This service can sometimes cause delays during the boot process if the network configuration takes a long time to initialize.

1. Disable the Service

To completely disable the systemd-networkd-wait-online.service, run the following command:

sudo systemctl disable systemd-networkd-wait-online.service

This will prevent the service from starting at boot time.

2. Mask the Service (Optional)

If you want to ensure that the service cannot be started manually or automatically by any other service, you can mask it:

sudo systemctl mask systemd-networkd-wait-online.service

Masking creates a symbolic link to /dev/null, making it impossible for the service to start unless explicitly unmasked.