CompTIA Linux+ XK0-005 – Question116

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?

A.
Create a unit file in the /etc/default/ directory.
systemctl enable cleanup
systemctl is-enabled cleanup
B. Create a unit file in the /etc/ske1/ directory.
systemctl enable cleanup
systemctl is-enabled cleanup
C. Create a unit file in the /etc/systemd/system/ directory.
systemctl enable cleanup
systemctl is-enabled cleanup
D. Create a unit file in the /etc/sysctl.d/ directory.
systemctl enable cleanup
systemctl is-enabled cleanup

Correct Answer: C