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.

In this tutorial you will learn:
  • How to list services in systemd with systemctl command
List of services on Linux
List of services on Linux
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Any Linux distro with systemd
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ - requires given linux commands to be executed as a regular non-privileged user

List services in systemd


SUBSCRIBE TO NEWSLETTER
Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


To see every loaded service on the system, open a command line terminal and execute the following command.

# systemctl list-units --type=service
List of all services marked as active
List of all services marked as active

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 command:

# systemctl list-units --type=service --state=running 
List of actively running services
List of actively running services

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
List of services that are enabled to start automatically
List of services that are enabled to start automatically

Change the state to disabled if you want to see disabled services (which won't start up automatically):

# systemctl list-unit-files --state=disabled
List of disabled services
List of disabled services

You can always check for more information about a specific service by checking its status in systemd. For example:



# systemctl status cups.service
Checking the status of a specific service within systemd
Checking the status of a specific service within systemd

Conclusion

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.

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in:



Comments and Discussions