Quizzessystemd — Service Management — Concept Check
intermediate
linux

systemd — Service Management — Concept Check

Questions on systemd — Service Management. systemd is the init system and service manager on modern Linux distros. systemctl, journalctl, and unit files let you start, stop, enable, and inspect any service on the system.

8 minutes 8 questions Pass at 70%
Time Limit
8 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

8 questions on systemd — Service Management — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A Linux server has nginx installed. Which command would you use to ensure nginx starts automatically on boot and starts immediately?

    • Asystemctl enable --now nginx
    • Bsystemctl enable nginx
    • Csystemctl start nginx
    • Dsystemctl restart nginx
  2. 2.You notice your application service is not running. You use 'systemctl status myapp' and see 'Active: failed'. What should you do first?

    • ARestart the service with 'systemctl restart myapp'
    • BEnable the service with 'systemctl enable myapp'
    • CReload the service with 'systemctl reload myapp'
    • DCheck the logs using 'journalctl -u myapp'
  3. 3.You want to see logs from the last boot of your server. Which command would you use?

    • Ajournalctl -u boot
    • Bjournalctl -b
    • Cjournalctl --since 'last boot'
    • Djournalctl -b -1
  4. 4.A service is running but you need to apply a new configuration without stopping it. What command should you use?

    • Asystemctl restart nginx
    • Bsystemctl stop nginx && systemctl start nginx
    • Csystemctl reload nginx
    • Dsystemctl enable nginx
  5. 5.You want to limit the disk space used by logs to 500MB. Which command achieves this?

    • Ajournalctl --limit-size=500M
    • Bjournalctl --vacuum-size=500M
    • Cjournalctl --disk-usage=500M
    • Djournalctl --truncate=500M
  6. 6.What does the 'systemctl is-active nginx' command return if the nginx service is running?

    • Aloaded
    • Benabled
    • Cactive
    • Drunning
  7. 7.You want to follow the logs of both nginx and postgresql services in real-time. Which command should you use?

    • Ajournalctl -f -u nginx -u postgresql
    • Bjournalctl -u nginx -u postgresql -f
    • Cjournalctl -u nginx -f -u postgresql
    • Djournalctl -u nginx postgresql -f
  8. 8.A developer claims that 'systemctl enable nginx' will start the service immediately. Why is this incorrect?

    • AIt both starts the service and enables it at boot
    • BIt disables the service at boot
    • C'systemctl enable nginx' only configures it to start at boot
    • DIt only reloads the service configuration