Devops PreRequisites->Linux basics->Services why in one lab question we have services mapped in /usr/bin/systemd/system but not under /etc/systemd/services?

Devops PreRequisites->Linux basics->Services why in one lab question we have services mapped in /usr/bin/systemd/system but not under /etc/systemd/services?
i.e we have app.service under /usr/bin/systemd/system folder. Ideally we expect services to be displayed under /etc/systemd/services folder right?

In Linux systems that use systemd as their init system, service files can be found in various directories. However, the paths you mentioned are not standard for service files. Here’s how it usually works:

  1. /etc/systemd/system/: This directory stores service files for services that are specific to the machine. It’s where system administrators can place their own service files or override the default service files provided by packages. This directory is checked first by systemd, so any service files here take precedence over other directories.
  2. /usr/lib/systemd/system/: This is the typical directory for service files provided by installed packages. These are default service files that come with the distribution’s packages.
  3. /run/systemd/system/: This directory is for runtime-generated service files. These are not persistent and will be cleared on reboot.

There is no standard directory named /etc/systemd/services or /usr/bin/systemd/system in systemd-based systems.