There are many different places where systemd unit files may be placed. Is there a quick and easy way to ask systemd where it read a service’s declaration from, given just the service name?
There are many different places where systemd unit files may be placed. Is there a quick and easy way to ask systemd where it read a service’s declaration from, given just the service name?
For units that are defined in actual, static files, this can be seen in
systemctl status
:But there are units that are not defined by files, e.g. with
systemd-cron
installed. These have no useful location listed withstatus
:In either case, though, the
FragmentPath
field is educating:You could cat the systemd unit. This shows the file location as comments. Bonus: It also shows overrides.