cmdxray / commands / systemctl

What does systemctl do?

control the systemd init system and its services.

▸ Explain your own systemctl command →

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

--nowalso start/stop immediately (with enable/disable)
--useract on the per-user systemd, not the system one
--failedlimit output to failed units
--no-pagerprint output directly instead of piping it to a pager
-lshow full output — do not truncate long lines
--fullshow full output — do not truncate long lines
-qquiet — suppress informational messages
--quietquiet — suppress informational messages
--typelimit to units of this type (service, socket, …)

Other commands

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.