Interview Prep/Linux/Packages, kernel and boot

You must make sure a server boots into text mode only, no GUI, and reduce boot time. How?

BeginnerScenarioPackages, kernel and boot
Answer

Situation read → Change the default systemd target and find slow units.

What I'd do →

sudo systemctl set-default multi-user.target
systemctl get-default
systemd-analyze
systemd-analyze blame | head -20
systemd-analyze critical-chain

Disable unneeded units with systemctl disable --now <unit>.

Why → Targets replaced runlevels; multi-user.target is the old runlevel 3.

Interview tip → NetworkManager-wait-online and cloud-init are common slow units.

All Linux questions Roadmap: Linux

More on Packages, kernel and boot