I prefer network to setup itself when I start computer, but I prefer to boot earlier and have network connect while I type my password and so on.
Sadly, according to systemd-analyze critical-chain
I am waiting for NetworkManager.service
startup during boot.
Is there a way to change that so that it still does its network things and it is not delaying boot?
graphical.target @8.083s
└─multi-user.target @8.083s
└─postfix.service @8.075s +7ms
└─postfix@-.service @3.904s +4.169s
└─network-online.target @3.880s
└─network.target @3.880s
└─NetworkManager.service @3.495s +384ms
└─dbus.service @3.492s
└─basic.target @3.472s
└─sockets.target @3.472s
└─docker.socket @3.469s +2ms
└─sysinit.target @3.464s
└─snapd.apparmor.service @3.131s +332ms
└─apparmor.service @2.990s +136ms
└─local-fs.target @2.989s
└─run-snapd-ns-cups.mnt.mount @5.417s
└─run-snapd-ns.mount @4.544s
└─local-fs-pre.target @528ms
└─keyboard-setup.service @376ms +152ms
└─systemd-journald.socket @361ms
└─system.slice @354ms
└─-.slice @354ms
There are two approaches:
1. Edit override config (
/etc/systemd/system/network-online.target.d/override.conf
)Type command
sudo systemctl edit network-online.target
paste the following config lines
That will create an override config at
/etc/systemd/system/network-online.target.d/override.conf
, which will partially override/etc/systemd/system/network-online.target
.2. Edit unit directly (
/etc/systemd/system/network-online.target
)Type command
sudo systemctl edit network-online.target --full
Find
After=
in[Unit]
section and change the value tographical.target
If you accidentally break the configuration, you can find the original one at
/lib/systemd/system/network-online.target
.sudo systemctl edit --force --full <your-service.service>
to create a new serviceman systemd.unit
to read the manualmulti-user.target
and graphics services are beforegraphical.target
(ref)man systemd.special
to read special systemd units manual