Where do unit files live and which takes precedence?
IntermediateConceptProcesses, Signals & systemd
Answer
From highest to lowest precedence: /etc/systemd/system/ (admin), /run/systemd/system/ (runtime), /usr/lib/systemd/system/ (packages). Never edit package units in /usr/lib; they get overwritten on upgrade. Use a drop-in:
sudo systemctl edit nginx # creates /etc/systemd/system/nginx.service.d/override.conf
systemctl cat nginx # shows unit plus all drop-ins
More on Processes, Signals & systemd
What is the difference between a program, a process and a thread?BeginnerHow are new processes created in Linux?IntermediateWhat is a zombie process, and how do you get rid of it?IntermediateWhat is an orphan process?BeginnerExplain the process states shown in ps (R, S, D, T, Z).IntermediateWhy can't you kill a process in D state?Advanced