How do you check which services are currently enabled on a systemd system?

Prepare for the LPIC-2 Certification Test with our study tools, including flashcards and multiple choice questions with hints and explanations. Get ready to pass your exam!

To determine which services are currently enabled on a systemd system, utilizing the command that lists unit files specifically tailored for services is the most appropriate method. Running "systemctl list-unit-files --type=service" provides a comprehensive view that shows not only the status (enabled, disabled, static, etc.) of all service unit files but also informs you about those that are currently active or inactive.

This command is specifically designed for systemd, which is the default init system in many modern Linux distributions. It allows administrators to manage system services and provides detailed information about them in a clear format.

In contrast, the other options are either specific to different init systems or do not provide the comprehensive information about the service status within systemd:

  • The command that uses "service --status-all" is more commonly associated with SysV init and doesn't apply to systemd.

  • "chkconfig --list" is a command used primarily in older init systems (particularly on Red Hat-based distributions) and does not align with the systemd framework.

  • "initctl list" is used with Upstart, which is another init system that has been largely replaced by systemd in many distributions.

Therefore, the selection of "systemctl list-unit-files --type=

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy