Linux Services

Linux Services

2023-09-04. Category & Tags: Linux Services, Nix Services

Folders #

Folder Description
/etc/systemd/system/ [suggested] for admin/root user (local config)
/usr/lib/systemd/(system/) for repo installed packages (using e.g. RPM)
/lib/systemd/(system/) (/lib is a symlink to /usr/lib)
/run/systemd/system runtime units

Note: “runtime units”: the ability to make modifications to a process (unit) during the current boot without that change/modification persisting across a reboot.

Tip: check which package a file belongs to:

  • for RPM (Cent/Fedora/RHEL): rpm -qf /usr/lib/systemd/system/* |sort -u | head
  • for Debian/Ubuntu: dpkg -S /lib/systemd/system/* |sort -u | head
    • -S == --search
    • This command will not list extra files created by maintainer scripts, nor will it list alternatives.
    • or: dpkg-query -S ...

Ref’s: man systemd.unit, man 7 file-hierarchy, stackoverflow.

...