Bird
0
0

You want to ensure a service backup.service runs only after the network is fully up. Which directive should you add to the service unit file?

hard📝 Application Q9 of 15
Linux CLI - System Administration
You want to ensure a service backup.service runs only after the network is fully up. Which directive should you add to the service unit file?
AAfter=network-online.target
BRequires=network.target
CBefore=network.target
DWants=network.service
Step-by-Step Solution
Solution:
  1. Step 1: Understand systemd target dependencies

    To run after network is fully ready, use After=network-online.target.
  2. Step 2: Analyze other options

    Requires=network.target only ensures network service is started but not fully online; Before=network.target runs before network; Wants=network.service is weaker dependency.
  3. Final Answer:

    After=network-online.target -> Option A
  4. Quick Check:

    Use After=network-online.target for full network readiness [OK]
Quick Trick: Use After=network-online.target to wait for full network [OK]
Common Mistakes:
  • Using network.target instead of network-online.target
  • Confusing Requires= with After=

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes