Section: Service Lifecycle

Restart a service

bash
bash
sudo systemctl restart nginx
Explanation

Useful after config or code changes.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Service Lifecycle
Start a service
Start a unit immediately.
OpenIn sheetbashsame section
Stop a service
Stop a running service.
OpenIn sheetbashsame section
Reload a service
Reload config without full restart if supported.
OpenIn sheetbashsame section
Try reload or restart
Reload when possible, restart otherwise.
OpenIn sheetbashsame section
Show service status
Inspect loaded, active, and failed state.
OpenIn sheetbashsame section
Check if service is active
Return a simple active state.
OpenIn sheetbashsame section