$ run as a normal user# run as root (or with sudo)
The quick answer
systemd-analyze
Startup finished in 1.9s (kernel) + 3.1s (initrd) + 1min 42.5s (userspace) = 1min 47.5s
systemd-analyze blame | head -10
systemd-analyze critical-chainStep by step
- Total time — kernel, initrd, userspace. Userspace (the services) is usually where the minutes are.
- Slowest units — but careful: many start in parallel, so a slow unit is not always the problem:
systemd-analyze blame | head -10
1min 30.022s NetworkManager-wait-online.service
8.410s cloud-init.service
3.201s mnt-share.mount
2.110s dnf-makecache.service- The critical chain — what the boot really waited for:
systemd-analyze critical-chain
multi-user.target @1min 42.5s
└─app.service @1min 31.2s +11.2s
└─network-online.target @1min 31.1s
└─NetworkManager-wait-online.service @1.1s +1min 30.0sHere: the app waits for "network online", and that waits 90 seconds (a timeout).
- Fix the usual causes:
| Slow unit | Usual cause | Fix |
|---|---|---|
NetworkManager-wait-online | An interface without link/DHCP answer (a second, unused NIC). | Set the unused connection to not auto-connect; or ipv4.may-fail; fix DHCP. |
*.mount / remote-fs.target | An NFS/SMB share that is not reachable. | _netdev,nofail and x-systemd.mount-timeout=30, or automount. |
cloud-init* | Waits for a metadata service that is not there. | Configure the right datasource, or disable cloud-init on non-cloud VMs. |
dnf-makecache, apt-daily | Package cache refresh at boot. | Move to a timer later (often already a timer). |
| A service you do not use | Default installs. | systemctl disable --now NAME (or mask). |
- A picture of the whole boot (open it in a browser):
systemd-analyze plot > /tmp/boot.svg- Warnings and errors of this boot — failed units also cost time:
systemctl --failed
journalctl -b -p warning --no-pager | tail -30Check that it worked
Reboot in a maintenance window, then:
systemd-analyze
systemd-analyze critical-chainThe userspace time is much lower, no unit waits for a timeout, and systemctl --failed is empty.
Common problems
| Problem | Cause | Fix |
|---|---|---|
Bootup is not yet finished | A unit is still starting (or hangs). | systemctl list-jobs; look at that unit's log. |
| Boot hangs with "A start job is running for …" | A mount or service waits for a timeout (often 90 s). | Fix the mount (nofail, timeout) or the service; DefaultTimeoutStartSec only as last resort. |
| Disabling a unit broke something | Another unit needed it. | systemctl list-dependencies --reverse NAME before disabling. |
| Fast to boot, app still starts late | App waits for the DB/network on its own. | Proper After=/Wants= and retries in the app. |
| Firmware/BIOS time is long | Hardware checks (not Linux). | systemd-analyze shows firmware on bare metal; change BIOS settings. |
| Kernel/initrd slow | Big initramfs, disk detection, LUKS prompt. | Check dmesg timing; rebuild initramfs with only needed drivers. |
Go further
- Command pages: systemd-analyze, systemctl, journalctl.
- Next how-tos: Mount a disk at boot with fstab, Start, stop and enable a service, Restart a service automatically when it crashes.
- Learn it: RHCSA — Boot targets, RHCSA — Boot steps, RH134 — Boot process.
- Practise: Lab: work with targets.
1Why is systemd-analyze blame alone not enough?
Units start in parallel; a slow unit only matters if others wait for it — critical-chain shows that.
2Boot waits 90 s on NetworkManager-wait-online. What is a usual cause?
An interface that never gets a link or DHCP answer (for example an unused second NIC).