0

I'm trying to link a list of installed packages to the services they have running on a system (init.d). I'm using ansible for this, but of course a bash hint is also usable.

For example if upon examination it turns out that openssh is installed, I want that the state and status of the service sshd is also reported.

Which ways are there to find out which services belong to which package ?

anlar
  • 4,165

1 Answers1

1

You can play with something like:

rpm -qal |grep /usr/lib/systemd/system/ |xargs -l1 basename | xargs systemctl status

Which ways are there to find out which services belong to which package ?

rpm -qf /usr/lib/systemd/system/podman.service
msuchy
  • 1,470