You need to change only the ExecStart line of the vendor-supplied apache2.service unit and ensure the modification survives future package upgrades. According to systemd's unit search order, in which exact path should you place the custom override file so that it takes precedence while leaving the original file untouched?
Systemd always loads unit files from several directories in a defined precedence. Files or drop-in snippets found in /etc/systemd/system override those shipped by the distribution in /usr/lib (or /lib) and are preserved across package upgrades. The recommended way to modify a single setting is to create a drop-in directory that matches the unit name and place a .conf file inside it. Therefore an override for apache2.service must be stored as /etc/systemd/system/apache2.service.d/override.conf. A file under /usr/lib would be replaced on the next package update, /run is only temporary, and /etc/systemd/override.d is not part of the unit search path.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a systemd unit file?
Open an interactive chat with Bash
Why are files in /etc/systemd/system preserved across updates?
Open an interactive chat with Bash
What is the purpose of drop-in files like override.conf?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .