While investigating intermittent restarts of example.service, you decide to raise the RestartSec value from 5 s to 30 s only for the remainder of the current boot. The change must be discarded automatically at the next reboot and the vendor-supplied unit file under /usr/lib/systemd/system should remain untouched. Which command launches an editor that allows you to make this temporary override?
The command that includes the --runtime option is correct because systemctl writes the override file to /run/systemd/system/.d/override.conf when --runtime is specified. Everything stored in /run is ephemeral and is removed at the next boot, so the adjustment is temporary and the original unit file is never modified. Running systemctl edit with no option (or with --full) creates the drop-in or a full replacement unit in /etc/systemd/system, making the change persistent across reboots. Using --user would edit the per-user instance of systemd and would not affect the system-wide example.service at all.
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 the purpose of the --runtime option in systemctl commands?
Open an interactive chat with Bash
What is the difference between --runtime and --full in systemctl edit?
Open an interactive chat with Bash
Why shouldn’t the vendor-supplied unit file in /usr/lib/systemd/system be directly modified?
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...
IT & Cybersecurity Package Join Premium for Full Access