220-1102 exam dumps

220-1102 practice question 275 of 828

A+ Core 2. Associate level, CompTIA. Free question with the correct answer and a full explanation.

220-1102 Question 275

Single answersystemd

A Linux workstation uses systemd. After a software update, a custom backup service named backup-agent.service no longer starts automatically after reboot. The script runs successfully when started manually with systemctl start backup-agent.service. As a technician, you need to make sure the service starts automatically on future boots using the correct systemd method. Which action should you take?

  1. A

    Run systemctl enable backup-agent.service

  2. B

    Run systemctl daemon-reexec backup-agent.service

  3. C

    Add backup-agent.service to /etc/rc.local

  4. D

    Run chkconfig backup-agent.service on

Show answer and explanation

Correct answer: A

Explanation

This question tests practical use of systemd service management. If a unit starts successfully with systemctl start but does not start after reboot, the most likely cause is that the unit is not enabled. The correct command is systemctl enable , which registers the service to start at boot according to the unit file's install directives. By contrast, systemctl start only starts the service for the current session and does not persist across reboots. Legacy methods such as rc.local and chkconfig are not the preferred approach on systemd systems. This aligns with standard systemd administration practices documented in systemctl and systemd.unit manual pages.

  • A. Correct.

    Correct. In systemd, enabling a service configures it to start automatically at boot by creating the appropriate symlinks based on the unit file's [Install] section, typically into a target such as multi-user.target.wants. Since the service starts manually, the immediate issue is most likely that it is not enabled for startup.

  • B. Incorrect.

    Incorrect. systemctl daemon-reexec causes systemd itself to re-execute its process while preserving state. This is a specialized administrative action and does not enable a service for automatic startup. A common misconception is confusing systemd daemon management with service startup configuration.

  • C. Incorrect.

    Incorrect. /etc/rc.local is a legacy startup mechanism and is not the standard way to manage service startup on systemd-based systems. Some distributions may not use rc.local by default at all. Using native systemd unit enablement is the recommended best practice.

  • D. Incorrect.

    Incorrect. chkconfig is associated with older SysVinit-based service management and is not the standard tool for enabling native systemd services. Some systems may provide compatibility wrappers, but for A+ and real-world best practice, systemctl enable is the correct command.

Timed practice exam

Take a 220-1102 practice test under exam conditions

90 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam