Where are systemd unit files typically located?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Where are systemd unit files typically located?

Explanation:
Systemd unit files are kept in locations that separate packaged units from administrator-provided ones. The standard place for files installed by packages is /usr/lib/systemd/system, while /etc/systemd/system is where you add or override units created by the administrator. Systemd will read units from both locations, and if a unit exists in both, the version in /etc/systemd/system takes precedence, allowing local customization without altering the packaged unit. The other paths mentioned aren’t for native systemd unit files: /etc/init.d holds legacy SysV init scripts, and /var/lib/systemd is used for state data, not for unit definitions.

Systemd unit files are kept in locations that separate packaged units from administrator-provided ones. The standard place for files installed by packages is /usr/lib/systemd/system, while /etc/systemd/system is where you add or override units created by the administrator. Systemd will read units from both locations, and if a unit exists in both, the version in /etc/systemd/system takes precedence, allowing local customization without altering the packaged unit.

The other paths mentioned aren’t for native systemd unit files: /etc/init.d holds legacy SysV init scripts, and /var/lib/systemd is used for state data, not for unit definitions.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy