Bird
0
0

You want to ensure the docker service starts automatically on boot and is currently running. Which two commands should you run in order, to achieve this?

hard📝 Application Q15 of 15
Linux CLI - Process Management
You want to ensure the docker service starts automatically on boot and is currently running. Which two commands should you run in order, to achieve this?
Asystemctl enable docker; systemctl status docker
Bsystemctl start docker; systemctl enable docker
Csystemctl restart docker; systemctl disable docker
Dsystemctl stop docker; systemctl enable docker
Step-by-Step Solution
Solution:
  1. Step 1: Understand the goal

    We want to ensure the docker service is currently running and starts automatically on boot.
  2. Step 2: Choose commands to enable boot start and ensure running

    Running systemctl start docker ensures the service is running (safe if already running), then systemctl enable docker sets it to start at boot.
  3. Final Answer:

    systemctl start docker; systemctl enable docker -> Option B
  4. Quick Check:

    Start first, then enable for boot start [OK]
Quick Trick: Start service first, then enable it for boot [OK]
Common Mistakes:
  • Enabling before starting service
  • Stopping service when wanting it running
  • Disabling service by mistake

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes