Skip to content

Instantly share code, notes, and snippets.

@PSJoshi
Created October 18, 2022 12:55
Show Gist options
  • Save PSJoshi/a5d3b3e1699bbaea66c55c5e3cf2fa5c to your computer and use it in GitHub Desktop.
Save PSJoshi/a5d3b3e1699bbaea66c55c5e3cf2fa5c to your computer and use it in GitHub Desktop.
Common systemctl commands

Systemctl commands

  • List services
# systemctl list-units --type=service
  • Show running services
# systemctl list-units --type=service --state=running 
  • List all services
# systemctl list-units --type=service --all
  • Enabled services
# systemctl list-unit-files --state=enabled
  • Disabled services
# systemctl list-unit-files --state=disabled
  • Service status
# systemctl status cups.service
  • List files/paths used by service
# systemctl cat supervisor.service
  • List contents of deb package
# dpkg -c <package_file.deb>
  • List installed package contents
# dpkg -L <package_name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment