Interview Prep/Linux/systemd services and journald

You edited `/usr/lib/systemd/system/nginx.service` directly and after a package update your change vanished.

BeginnerTroubleshootingsystemd services and journald
Answer

Likely causes → Vendor unit files are owned by the package and get overwritten.

Diagnose →

systemctl cat nginx            # shows which files are used
systemd-delta --type=extended,overridden

Fix → Put the change in a drop-in: systemctl edit nginx (creates /etc/systemd/system/nginx.service.d/override.conf).

Prevent → Never edit /usr/lib/systemd/system/; systemd-delta in audits finds local overrides.

All Linux questions Roadmap: Linux

More on systemd services and journald