How to Use Systemctl to List All Services in Linux

The Systemctl utility manages Systemd processes. It consists of libraries, demons, and management utilities that replaced the SysV init daemon. You can use Systemctl to manage resources and services (start, stop, restart, enable, disable). Moreover, Systemctl checks service status to gain deeper insights into them.

Remember that Systemd is the default init system in almost every Linux distribution. It would be best if you learned Systemctl to manage Systemd efficiently.

However, if you are new to Systemctl, we recommend learning the commands to list services using Systemctl. So, this blog has all the possible commands to use Systemctl to list all services in Linux.

List all services

To list all services, you have to include multiple options with the Systemctl command:

systemctl list-units --type=service

In the above syntax:

list-units: Instructs the Systemctl utility to show the units the system has loaded or attempted to load.

–type=service: Specify that you want to see only service-type units.

command to list all Linux services

The Systemctl output shows different columns having the specific information:

  • UNIT: Shows the name of the service unit.
  • LOAD: Shows if the service unit is loaded successfully.
  • ACTIVE: Indicates the current activation state of a service.
  • SUB: Shows a detailed state of a service.
  • DESCRIPTION: Contains the information about the service unit.

List active and inactive both.

Furthermore, if you want to list all the services, including inactive/dead ones, then you can use the –all option with the above command:

systemctl list-units –type=services --all
command to list activer or dead linux services

List Failed services only

In case you are only looking for the failed services, then please use the –failed option with the Systemctl to list them:

systemctl list-units --type=services --failed
comamnd to list failed linux services

List Services enabled or disabled

You can use the –state option to list the services enabled or disabled to start on boot:

systemctl list-unit-files --type=service --state=enabled
systemctl list-unit-files --type=service --state=disabled
list the services enabled or disabled to start on boot on Linux

Linux services that are active or loaded

Similarly, you can use loaded and active with the –-state option:

systemctl list-unit-files --type=service --state=active
List the services by their state

 Check the services that are loaded:

systemctl list-unit-files --type=service --state=loaded
Check the services that are loaded linux

To Check the Status of a service

Finally, if you are not looking for the complete list and want to check a specific service, then the following command will help you:

systemctl status service_name.service

Here, replace “service_name” with the service you wish to check. For instance, let’s check the status of anacron.service using the systemctl command:

systemctl status anacron.service
how to check a specific service on Linux status

Wrapping Up

You can use the Systemctl utility to list all services and filter them by adding additional options. It is an excellent utility for managing Systemd and checking the insights of the currently running services. We have included different options and commands to list and check the services. Moreover, we recommend that you write the command correctly without extra space, or else you will get errors.

Other Articles:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.