CompTIA Linux+ (XK0-005) — Question 139

A Linux engineer needs to create a custom script, cleanup.sh, to run at boot as part of the system services. Which of the following processes would accomplish this task?

Answer options

Correct answer: C

Explanation

The correct answer is C because systemd unit files should be placed in the /etc/systemd/system/ directory to manage services. Options A, B, and D reference incorrect directories that do not serve the purpose of defining systemd services, thus they will not work for setting up the script to run at boot.