Linux systemd Analyze and Troubleshooting Cheat Sheet

Use systemd-analyze, unit verification, logs, and dependency tools to diagnose systemd problems.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

Boot Analysis

Measure and visualize startup delays.

Show boot time

Measure firmware, loader, kernel, and userspace startup time.

bashANYsystemd-analyzeboottime
bash
systemd-analyze time
Notes

Fast first look at slow boot issues.

Show slowest units

List units ordered by startup time.

bashANYsystemd-analyzeblamestartup
bash
systemd-analyze blame
Notes

Great for identifying services slowing boot.

Show critical startup chain

Display boot dependency chain affecting startup time.

bashANYsystemd-analyzecritical-chainboot
bash
systemd-analyze critical-chain
Notes

Useful when blame alone does not explain ordering impact.

Generate boot SVG plot

Create an SVG timeline of boot.

bashANYsystemd-analyzeplotsvg
bash
systemd-analyze plot > boot.svg
Notes

Helpful for visual boot analysis.

Verification and Security

Validate units and inspect hardening.

Verify a unit file

Validate unit syntax and references.

bashANYsystemd-analyzeverifyunit-file
bash
systemd-analyze verify /etc/systemd/system/myapp.service
Notes

Run this before or after writing custom units.

Analyze service security

Show hardening score and suggestions.

bashANYsystemd-analyzesecurityhardening
bash
systemd-analyze security nginx.service
Notes

Useful when improving service isolation and sandboxing.

Show service command

Inspect the ExecStart setting.

bashANYsystemctlExecStartdebug
bash
systemctl show myapp -p ExecStart
Notes

Good for checking what systemd is really executing.

Show environment references

Inspect environment-related properties.

bashANYsystemctlenvironmentdebug
bash
systemctl show myapp -p Environment -p EnvironmentFiles
Notes

Useful for broken env variable issues.

Incident Debugging

Troubleshoot failed services and restart loops.

Inspect failed service

Show last status and logs for a failed unit.

bashANYsystemctlfailedincident
bash
systemctl status myapp.service
Notes

Status is often the fastest single command for incidents.

Service logs this boot

Show one service's logs for the current boot.

bashANYjournalctlserviceboot
bash
journalctl -u myapp.service -b
Notes

Focuses on current startup issues only.

Service logs previous boot

Inspect service logs from the last boot.

bashANYjournalctlserviceprevious-boot
bash
journalctl -u myapp.service -b -1
Notes

Valuable after a boot-loop or crash.

Show restart policy

Inspect restart and rate limit settings.

bashANYsystemctlrestartpolicy
bash
systemctl show myapp -p Restart -p RestartSec -p StartLimitIntervalUSec -p StartLimitBurst
Notes

Critical when diagnosing restart loops.

Create override drop-in

Open editor for safe unit overrides.

bashANYsystemctleditoverride
bash
sudo systemctl edit myapp
Notes

Preferred over editing vendor files directly.

Remove overrides

Revert a unit to vendor/default state.

bashANYsystemctlrevertoverride
bash
sudo systemctl revert myapp
Notes

Handy when overrides caused problems.

More in Linux systemd Analyze and Troubleshooting

No other published sheets yet.

Recommended next

No recommendations yet.