Which command lists dependencies for the network target?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which command lists dependencies for the network target?

Explanation:
In systemd, targets group units and define what must be started to reach a certain state. To see exactly what a target pulls in or requires, you list its dependencies, which reveals the dependency tree of that target. The best command is systemctl list-dependencies network.target. It prints the full chain of units that network.target depends on or wants, organized in a tree. This helps you understand what gets started when networking comes up and which pieces are tied to that target. You can use --reverse if you also want to see what units depend on the target. The other options don’t fit as well. systemctl show network.target would display properties of the unit (like Requires and Wants) but not the full dependency tree in a readable list. systemctl list-unit-files --type=service shows available service unit files, not how a target relates to other units. systemctl show network.target dependencies isn’t a valid invocation; systemctl show expects a unit name, not a keyword like dependencies.

In systemd, targets group units and define what must be started to reach a certain state. To see exactly what a target pulls in or requires, you list its dependencies, which reveals the dependency tree of that target.

The best command is systemctl list-dependencies network.target. It prints the full chain of units that network.target depends on or wants, organized in a tree. This helps you understand what gets started when networking comes up and which pieces are tied to that target. You can use --reverse if you also want to see what units depend on the target.

The other options don’t fit as well. systemctl show network.target would display properties of the unit (like Requires and Wants) but not the full dependency tree in a readable list. systemctl list-unit-files --type=service shows available service unit files, not how a target relates to other units. systemctl show network.target dependencies isn’t a valid invocation; systemctl show expects a unit name, not a keyword like dependencies.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy