Linux Commands / IT Support Guides
Inspect a systemd service before restarting it
A failed service may be the visible consequence of a bad configuration, missing dependency or exhausted resource. Read its current state and recent journal first.
Environment and inputs: Linux · Bash-compatible shell; package and service names vary by distribution
Try the diagnostic command
Use the stated shell and platform. Replace sample domains, addresses, services and paths with values from the system you are authorized to support.
systemctl status nginx --no-pager
systemctl is-enabled nginx
How to read the result
The status view shows runtime state and recent messages. is-enabled reports startup enablement, which is separate from whether the service is currently running.
What to do next
Replace nginx with the real unit name. Collect the first relevant startup error, check the service-specific configuration and test the dependency that failed before planning a restart.
Before you make a change
This guide applies to systemd hosts. Some service details require elevated access, and unit names can differ between distributions.