Which command allows you to view all running services on a system?

Prepare for the Linux Professional Institute Certification Level 1. Use flashcards and multiple choice questions, complete with hints and explanations. Enhance your understanding and get ready to ace the exam!

The command that allows you to view all running services on a system is "systemctl list-units --type=service." This command is designed specifically for managing system services under systemd, which is a common init system used in many modern Linux distributions.

When using "systemctl list-units --type=service," it provides a filtered list of all units of the type "service." This means you will see specifically those units that represent services, along with their current status, such as whether they are active, inactive, or failed. This level of specificity makes it particularly useful for administrators looking to manage or troubleshoot running services.

Other options might show information about services, but they do not provide the same level of targeted detail. For instance, "systemctl list-units" displays all units without filtering for services specifically, which could include timers, sockets, and other types of units, leading to a more cluttered output. Meanwhile, "systemctl status" shows the status of a single unit if specified, not all running services. The command "service --status-all" lists all services (both running and stopped) but is not as commonly used in systems employing systemd, where the "systemctl" command structure is preferred.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy