Interview Prep/Linux/Processes, services and systemd

You need to change one setting (memory limit) in a vendor-supplied unit file without editing it. How?

BeginnerScenarioProcesses, services and systemd
Answer

Situation read → Use a drop-in override.

What I'd do →

sudo systemctl edit vendor-agent

Add:

[Service]
MemoryMax=512M

Save; systemd writes /etc/systemd/system/vendor-agent.service.d/override.conf and reloads. Restart the service and check with systemctl show vendor-agent -p MemoryMax or systemctl cat vendor-agent.

Why → Package upgrades overwrite /usr/lib/systemd/system/*.service, but never your drop-ins.

Interview tip → To clear a list setting like ExecStart, write an empty ExecStart= line first in the drop-in.

All Linux questions Roadmap: Linux

More on Processes, services and systemd