1.查看总的开机时间
$ systemd-analyze time
Startup finished in 2.266s (kernel) + 17.700s (userspace) = 19.966s
graphical.target reached after 17.682s in userspace
2.查看具体服务的启动时间
$ systemd-analyze blame
16.450s plymouth-quit-wait.service
14.254s vboxadd.service
1.024s snapd.service
997ms NetworkManager-wait-online.service
906ms docker.service...
3.查看主要的时间消耗链路
$ systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.
graphical.target @17.682s
└─multi-user.target @17.682s
└─plymouth-quit-wait.service @1.231s +16.450s
└─systemd-user-sessions.service @1.223s +7ms
└─network.target @1.218s
...