Bird
0
0

Where should you place a custom systemd service unit file to ensure it overrides the default service configuration without modifying system files?

hard📝 Application Q8 of 15
Linux CLI - System Administration
Where should you place a custom systemd service unit file to ensure it overrides the default service configuration without modifying system files?
A/lib/systemd/system/
B/usr/lib/systemd/system/
C/etc/systemd/system/
D/var/lib/systemd/system/
Step-by-Step Solution
Solution:
  1. Step 1: Understand systemd unit file hierarchy

    Custom or override unit files should be placed in /etc/systemd/system/ to take precedence over default files.
  2. Step 2: Differentiate system directories

    /usr/lib/systemd/system/ and /lib/systemd/system/ contain vendor-provided units and should not be modified directly.
  3. Step 3: Confirm correct location

    Using /etc/systemd/system/ allows safe customization and persistence across package updates.
  4. Final Answer:

    /etc/systemd/system/ -> Option C
  5. Quick Check:

    Custom units go in /etc/systemd/system [OK]
Quick Trick: Put custom units in /etc/systemd/system for overrides [OK]
Common Mistakes:
  • Placing custom units in /usr/lib/systemd/system/
  • Modifying vendor files directly
  • Using non-standard directories like /var/lib/systemd/system/

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes