systemctl Service List Explained: How to View, Manage, and Troubleshoot Linux Services

1. Introduction

When using Linux, there are many situations where you want to check the status of services or view a list of running processes. In such cases, the systemctl command is extremely useful.

This command works with systemd, the startup system and service manager used in modern Linux distributions. It provides a wide range of functions, including checking service (unit) status, starting, stopping, restarting services, and displaying service lists.

From the perspective of a “systemctl service list,” you can not only view currently active services but also disabled services and those configured for automatic startup, allowing you to understand the overall system configuration from multiple angles.

This chapter briefly explains what systemctl is and outlines what you will learn in this article.

What Is systemctl?

systemctl is the standard tool for controlling and inspecting various “units” such as services, targets, and mount points on systemd-based Linux distributions.

For example, it is used to start or stop services such as Apache (httpd) and SSH, as well as to display their status in list form.

The Relationship Between systemd and systemctl

systemd is the core mechanism responsible for Linux startup processes and service management, replacing older systems such as SysVinit and Upstart. The command-line tool used to interact with systemd is systemctl.

In other words, if systemd is the command center, systemctl acts as the operator issuing instructions.

What You Will Learn in This Article

This article answers the following questions:

  • How can you view a list of currently running services?
  • How do you display all services, including inactive ones?
  • How can you check whether a service starts automatically at boot?
  • How should you interpret the output of service lists?

To ensure clarity for Linux beginners, command examples and explanations of output are provided in detail.

2. How to Display a List of Services with systemctl

In Linux system administration, quickly understanding the list of services is extremely important. Using the systemctl command, you can easily check active services, inactive services, and startup configuration settings.

This section explains service listing methods from the following three perspectives:

  • List of active services
  • List of all services (including inactive ones)
  • List of service unit files (including startup settings)

2.1 Displaying a List of Currently Active Services

To check services that are currently running, use the following command:

systemctl list-units --type=service

This command displays a list of active services. The output includes the following fields:

FieldDescription
UNITService name (e.g., ssh.service)
LOADWhether the unit file is loaded
ACTIVEService state (e.g., active, inactive, failed)
SUBMore detailed status (e.g., running, exited, dead)
DESCRIPTIONService description

This information allows you to determine, for example, whether nginx is running or which services are currently active.

2.2 Displaying All Services Including Inactive Ones

By default, list-units shows only active services. To include inactive services, add the --all option.

systemctl list-units --type=service --all

This displays inactive services and those that have never been started.

You can further filter results by service state using the --state= option:

systemctl list-units --type=service --state=inactive

This is useful when you want to view only stopped services.

2.3 Viewing a List of Service Unit Files

To check which services are enabled or disabled at boot, use the following command:

systemctl list-unit-files --type=service

This command displays all service unit files along with their enabled or disabled states.

STATEDescription
enabledAutomatically starts at boot
disabledDoes not start automatically
staticCannot be enabled or disabled manually
maskedExplicitly disabled and cannot be started

This list helps you visually understand which services start at boot and identify mistakenly masked services.

3. Basic Service Management with systemctl

The systemctl command allows you to start, stop, restart services, and configure startup behavior.

3.1 Starting a Service

sudo systemctl start service-name

Example:

sudo systemctl start httpd.service

3.2 Stopping a Service

sudo systemctl stop service-name

Example:

sudo systemctl stop sshd.service

3.3 Restarting a Service

sudo systemctl restart service-name

Example:

sudo systemctl restart nginx.service

3.4 Checking Service Status

systemctl status service-name

Example:

systemctl status mysql.service

3.5 Enabling Automatic Startup

sudo systemctl enable service-name

Example:

sudo systemctl enable docker.service

3.6 Disabling Automatic Startup

sudo systemctl disable service-name

Example:

sudo systemctl disable cups.service

3.7 Checking Startup Status

systemctl is-enabled service-name
enabled

4. Useful systemctl Options and Advanced Techniques

4.1 Listing Service Dependencies

systemctl list-dependencies service-name

4.2 Viewing Unit File Contents

systemctl cat service-name

4.3 Reloading Unit Files

sudo systemctl daemon-reexec
sudo systemctl daemon-reload

4.4 Viewing Service Logs

journalctl -u service-name

5. Common Issues and Troubleshooting

5.1 When a Service Fails to Start

systemctl status service-name
journalctl -xe

5.2 Understanding Error Messages in status Output


● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
   Active: failed (Result: exit-code)

5.3 Services That Stop Immediately After Starting

  • Configuration errors
  • Port conflicts
  • Missing files or directories
  • Insufficient permissions

5.4 When a Service Is Masked

sudo systemctl unmask service-name

6. Summary

Service management is an essential part of Linux system operations, and systemctl plays a central role in controlling and understanding system services.

7. Frequently Asked Questions (FAQ)

This section answers common questions about systemctl and service management.

Q1. What is the difference between systemctl and the service command?

A1.
systemctl is a service management command designed for systemd-based systems and is the standard tool used by most modern Linux distributions such as Ubuntu, CentOS, and Fedora.
In contrast, the service command was used with older SysVinit-based systems. While it may still exist for compatibility reasons, using systemctl is strongly recommended in systemd environments.

Q2. What is the difference between list-units and list-unit-files?

A2.

  • list-units displays currently loaded units, meaning services that are running or have been used recently.
  • list-unit-files displays all unit files and their enablement status (enabled, disabled, etc.).
    In short, one shows what is currently active, while the other shows how services are configured.

Q3. Can services in a static state be started?

A3.
Yes, services in a static state can be started manually using start. However, they cannot be enabled for automatic startup at boot.
This is because static services are designed to be started as dependencies of other units.

Q4. A service is masked and cannot be started. What should I do?

A4.
A masked service is completely disabled and cannot be started. To resolve this, unmask the service using the following command:

sudo systemctl unmask service-name

After unmasking, you can start the service normally.

Q5. Is there a GUI method to view service status?

A5.
Depending on the distribution, tools such as gnome-system-monitor, KSysGuard, or Cockpit allow you to view service status through a graphical interface.
However, for advanced operations such as enabling or disabling services at boot, systemctl remains the most reliable method.

Q6. Where should I place custom unit files?

A6.
Custom unit files are typically placed in /etc/systemd/system/. After editing or adding a unit file, always run the following command:

sudo systemctl daemon-reload

You can then manage the service normally using start or enable.