Which command lists all currently loaded service units?

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 all currently loaded service units?

Explanation:
You're being tested on how to see which systemd units are currently loaded into memory, specifically the service units. The command that lists those loaded units is systemctl list-units with a type filter for services. This command shows you the units that systemd has actively loaded, along with their current state (load, active, and sub state) and a short description. Filtering by type=service ensures you only see service units, not other unit types like sockets or timers. The other options don’t fit this purpose. Listing unit files shows definitions on disk, not what’s currently loaded in memory. Asking for status or show targets a particular unit (or a set of units) to display details about it, not a comprehensive list of all loaded services. So the command that correctly lists all currently loaded service units is the one that queries the in-memory set of units and restricts the output to services.

You're being tested on how to see which systemd units are currently loaded into memory, specifically the service units. The command that lists those loaded units is systemctl list-units with a type filter for services. This command shows you the units that systemd has actively loaded, along with their current state (load, active, and sub state) and a short description. Filtering by type=service ensures you only see service units, not other unit types like sockets or timers.

The other options don’t fit this purpose. Listing unit files shows definitions on disk, not what’s currently loaded in memory. Asking for status or show targets a particular unit (or a set of units) to display details about it, not a comprehensive list of all loaded services. So the command that correctly lists all currently loaded service units is the one that queries the in-memory set of units and restricts the output to services.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy