If this system is not a server in a network, you can start by cutting down on time used by NetworkManager-wait-online.service
, to do this please disable the service like so:
sudo systemctl disable NetworkManager-wait-online.service
If it shows up again after reboot, you can follow the above command with this:
sudo systemctl mask NetworkManager-wait-online.service
Pleas, try this first and check if your boot time improves before carrying on with any further steps. This alone, sometimes, reduces your boot time by a great deal.
To roll back the above changes anytime, please run:
sudo systemctl unmask NetworkManager-wait-online.service
Then follow it by:
sudo systemctl enable NetworkManager-wait-online.service
What is systemd-networkd-wait-online.service
?
NAME
systemd-networkd-wait-online.service, systemd-networkd-wait-online - Wait for network to come online
SYNOPSIS
systemd-networkd-wait-online.service
/lib/systemd/systemd-networkd-wait-online
DESCRIPTION
systemd-networkd-wait-online is a oneshot system service (see systemd.service(5)), that waits for the network to be
configured. By default, it will wait for all links it is aware of and which are managed by systemd-
networkd.service(8) to be fully configured or failed, and for at least one link to be online. Here, online means
that the link's operational state is equal or higher than "degraded". The threshold can be configured by
--operational-state= option.
The purpose of the NetworkManager-wait-online.service
is to wait for the network to come online before proceeding with the boot process.
This is needed in case of for example servers that rely on network resources as part of the boot process ( eg. mounting remote drives ) or in the case of workstations that rely on the network to boot correctly ( eg. Thin Clients ).
Otherwise, desktop users can disable NetworkManager-wait-online.service
and network will connect normally after boot has finished minus the unneeded wait time.
It is safe to disable in this case.
Best Answer
You can decide it by yourself. But on my systems (mainly 16.04 LTS) I have disabled both with:
Because of the fact that some functionality on desktop is provided by
update-manager
andI do not want to get error messages about lock-files in archives or lists directories whenever I run
apt
manually.