How to Streamline Ubuntu Boot Time by Disabling Unnecessary Daemons
Watching Ubuntu drag its feet at boot? In fast-paced workflows, waiting 30+ seconds for a system prompt burns valuable time. Disabling unnecessary daemons is typically the quickest—and least intrusive—method for reducing startup latency. No hardware upgrades, no risky kernel optimizations.
Analyzing Startup: Where the Time Goes
Systemd orchestrates startup in recent Ubuntu distributions (22.04 LTS, 23.04, etc). Every enabled service runs at boot and—crucially—each service pulls in dependencies, some of which you may not need.
Inspect which services systemd starts by default:
systemctl list-unit-files --type=service --state=enabled
On a typical developer laptop, you’ll see dozens of services. Only a subset are strictly necessary.
Typical Candidates for Disabling
bluetooth.service
– Laptop lacks Bluetooth hardware? Obvious candidate.cups.service
– No printers. Why run a print server?ModemManager.service
– Legacy dial-up or cellular modems; often irrelevant on Ethernet/WiFi-only systems.avahi-daemon.service
– Zeroconf network name resolution, rarely essential outside multicast-heavy environments.snapd.service
– Manages Snap runtime auto-updates; disabling breaks Snap apps but reduces background I/O.whoopsie.service
,apport.service
– Telemetry/crash reports; disable on systems where privacy or minimal resource usage takes precedence.
Note: Disabling services involved in networking or encryption (NetworkManager
, systemd-resolved
, systemd-timesyncd
, etc.) is not recommended unless replacements exist and are properly configured.
Evaluate and Profile Boot Performance
Before deep surgery, establish baseline boot metrics.
systemd-analyze
Yields summary output (e.g.):
Startup finished in 2.579s (firmware) + 1.112s (loader) + 4.913s (kernel) + 9.787s (userspace) = 18.391s
graphical.target reached after 9.186s in userspace
To focus efforts:
systemd-analyze blame
Sorts running services by their startup time:
3.011s snapd.service
2.244s cups.service
1.018s bluetooth.service
Direct your attention to the top offenders—these have greatest impact.
Disabling Unneeded Services
Decisive action:
- Stop service immediately:
sudo systemctl stop cups.service
- Disable for subsequent boots:
sudo systemctl disable cups.service
Repeat for each irrelevant service. Double-check required functionality before disabling—critical for headless servers.
Practical gotcha:
Some services re-activate via dependencies. Masking fully prevents this:
sudo systemctl mask bluetooth.service
Reverse with:
sudo systemctl unmask bluetooth.service
Side Effects and Trade-offs
- snapd.service: Disabling disables Snap apps completely. If unused, system updates are leaner.
- cups.service: Disables print sharing but also affects PDF printing in some desktop applications; test workflows.
- apport/whoopsie: Disabling may hinder upstream support if reporting bugs.
Certain daemons draw negligible resources but can cause intermittent disk I/O (see: modemmanager
logs or AppArmor noise in /var/log/syslog
).
Reducing GRUB Timeout
Default GRUB boot menu delays often waste a few seconds. Adjust for an interactive or single-boot environment:
Edit /etc/default/grub
:
GRUB_TIMEOUT=0
Or, set to 1
or 2
for a minimal fallback window.
Apply with:
sudo update-grub
Using a Lighter Display Manager
Resource-constrained hardware? Switching from GDM3 to LightDM typically saves 100+ MB of RAM.
sudo apt install lightdm
sudo dpkg-reconfigure lightdm
Reboot. Test suspend/resume—occasionally, video drivers react differently.
Non-obvious Optimization: Parallel Boot
Systemd parallelizes service start by default, but some units declare After=
or Wants=
dependencies that serialize startup. Inspect with:
systemctl show -p After NetworkManager.service
If a particular unit has excessive dependencies, consider systemctl edit
to override.
Caution: Never adjust system units unless you deeply understand implications.
Benchmark Again
Re-run systemd-analyze
and systemd-analyze blame
post-changes; expect improvements of several seconds, though disk-bound systems may see diminishing returns. On NVMe, bottlenecks shift almost entirely to user session startup scripts.
Actual output, after basic pruning:
Startup finished in 2.001s (firmware) + 1.039s (loader) + 3.887s (kernel) + 5.670s (userspace) = 12.597s
Side note: Empirically, removing Snap support on Ubuntu Desktop 22.04 reduces SSD thrashing during heavy logins.
Summary
Optimizing Ubuntu boot primarily means controlling systemd’s enabled services. Use historical output from systemd-analyze
to locate bottlenecks. For any unit you don’t recognize, check its manpage (man [service name]
) or Ubuntu documentation—incorrect guesses aren’t always recoverable.
Not perfect, but the fastest return on your tuning time. There are other, deeper system-level optimizations (preload tuning, initramfs minimization, NVMe TRIM cycles), but unnecessary for most engineering workstations.
Want more detail on systemd bootcharting or desktop environment swap? Email or ping for specifics.