Linux Troubleshooting

Diagnose a failed systemd service

Why did the service die? Read the unit log and fix the actual error.

11 min read Beginner Updated 9 Jun 2026

Step-by-step guide

Work through each section in order. Stop when your issue is resolved — you do not need every step for every situation.

Warning

Use a sudo-capable account, keep shell history for audit, and back up critical paths before changing boot, SSH, or package state.

What you will achieve

Why did the service die? Read the unit log and fix the actual error.

1) Check status and exit reason

systemctl status your-service.service

2) Pull recent logs for unit

journalctl -u your-service.service -n 200 --no-pager

3) Validate unit file and command paths

systemd-analyze verify /etc/systemd/system/your-service.service

Related guides

linux systemd troubleshooting