systemctl examples, explained
$ systemctl restart nginx
- systemctlcontrol the systemd init system and its services
- restartstop and start a service
- nginxan argument passed to the command
$ systemctl enable --now docker
- systemctlcontrol the systemd init system and its services
- enablestart this service automatically at boot
- --nowalso start/stop immediately (with enable/disable)
- dockeran argument passed to the command
$ systemctl status nginx --no-pager -l
- systemctlcontrol the systemd init system and its services
- statusshow whether a service is running, plus recent logs
- nginxan argument passed to the command
- --no-pagerprint output directly instead of piping it to a pager
- -lshow full output — do not truncate long lines
systemctl subcommands
start — start a service nowstop — stop a running service nowrestart — stop and start a servicereload — tell a service to reload its configurationstatus — show whether a service is running, plus recent logsenable — start this service automatically at bootdisable — do not start this service at bootdaemon-reload — reload systemd's own unit files after editslist — list unitsis-active — check whether a unit is currently running
systemctl flags & options
| --now | also start/stop immediately (with enable/disable) |
| --user | act on the per-user systemd, not the system one |
| --failed | limit output to failed units |
| --no-pager | print output directly instead of piping it to a pager |
| -l | show full output — do not truncate long lines |
| --full | show full output — do not truncate long lines |
| -q | quiet — suppress informational messages |
| --quiet | quiet — suppress informational messages |
| --type | limit to units of this type (service, socket, …) |
Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.