CompTIA Linux+ (XK0-005) — Question 283

A systems administrator needs to create a new service unit file. This new unit file is required to start when all services are running with the command-line interface only. Which of the following options should the administrator use to accomplish this task?

Answer options

Correct answer: C

Explanation

The correct option, WantedBy=multi-user.target, is appropriate because it specifies that the service should start when the system reaches a state where multiple users can log in, indicating that all essential services are operational. The other options, like WantedBy=basic.target and WantedBy=graphical.target, do not guarantee that all services are running, and WantedBy=network-online.target is specifically for network services, not general service availability.