Skip to content

Instantly share code, notes, and snippets.

@sq3
Last active February 26, 2018 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sq3/ef472cdb2bd63c98cd162f33e71a6064 to your computer and use it in GitHub Desktop.
Save sq3/ef472cdb2bd63c98cd162f33e71a6064 to your computer and use it in GitHub Desktop.
systemd cheat sheet

systemd cheat sheet

systemctl

Controll a Service

Show service status

$ systemctl status httpd.service

Start / Stop a service

$ systemctl start httpd.service $ systemctl stop httpd.service

Enable a service for starting on boot

$ systemctl enable httpd.service

Disable a service for starting on boot

$ systemctl disable httpd.service

List all running units

$ systemctl status

List all available units

$ systemctl list-units

List all failed units

$ systemctl list-units --state=failed

List all enabled units

$ systemctl list-unit-files --state=enable

Show unitfile

$ systemctl cat httpd.service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment