systemctl
Control the systemd system and service manager
Overview
Used to introspect and control the state of the systemd system and service manager. Start, stop, restart, enable, and disable system services.
Syntax
systemctl [OPTIONS...] COMMAND [UNIT...]Common Options
--userTalk to the service manager of the calling user.
-t, --type=TYPEFilter units by type (e.g., service, socket, target).
--state=STATEFilter units by load state, sub state, or overall state.
-a, --allShow all loaded units regardless of their state.
--no-pagerDo not pipe output into a pager.
-l, --fullDo not ellipsize unit names on output.
Examples
Show the status of the nginx service.
Start the nginx service.
Stop the nginx service.
Restart the nginx service.
Reload nginx configuration without stopping the service.
Enable nginx to start on boot.
Disable nginx from starting on boot.
Check if nginx is currently running.
Check if nginx is enabled to start on boot.
List all running services.
List all service unit files and their enablement state.
Reload systemd manager configuration (after editing unit files).
Show the unit file for nginx.