systemd is a software suite that's present on many Linux distributions. It's not quite ubiquitous, but it's a staple on the most popular distros, including Debian, Ubuntu, Fedora, Manjaro and Arch, and more.
What it's best known for is having the ability to control processes running on a system. Using systemd, you can start or stop any service installed on Linux. It's also an easy tool to list information about the services, such as if they are running, if they start automatically at boot up, etc. In this guide, we'll show how to use systemd (specifically the
systemctl command) to a see a list of services on Linux.
- How to list services in systemd with systemctl command
|Category||Requirements, Conventions or Software Version Used|
|System||Any Linux distro with systemd|
|Other||Privileged access to your Linux system as root or via the |
|Conventions|| # - requires given linux commands to be executed with root privileges either directly as a root user or by use of |
List services in systemd
To see every loaded service on the system, open a command line terminal and execute the following command.
# systemctl list-units --type=service
In many situations, it's more beneficial to just receive a quick output of all actively running services (i.e. services that are consuming resources and actually doing something). In that respect, it's similar to the ps command. You can see a more concise list with the following
# systemctl list-units --type=service --state=running
You can also see the loaded but inactive units by passing the
--all option. This will list a lot more services, which may be irrelevant if you only need to see active and running services.
# systemctl list-units --type=service --all
To see which services are enabled (meaning that they will start automatically when your system boots up), use the following command:
# systemctl list-unit-files --state=enabled
Change the state to disabled if you want to see disabled services (which won't start up automatically):
# systemctl list-unit-files --state=disabled
You can always check for more information about a specific service by checking its status in systemd. For example:
# systemctl status cups.service
In this article, we learned how to use systemd to see a list of services on Linux. There are various options you can specify with the
systemctl command in order to isolate the information that you need. Knowing these commands should allow you to better understand all the services that are running on your system.