Categories: Ubuntu

How to list services in Ubuntu

Various services on your Ubuntu Linux distribution run in the background and as a system administrator, you will need to be able to view all services, including system services like process management, login, cron jobs, and syslog. Ubuntu allows you to list all these services through specific commands.

The background processes or system programs are also ‘daemons’. These services are in charge of how the system works and how it connects with other programs. When working in a Linux environment, such as Ubuntu, you can use a service manager to conveniently control all system services. The process manager ‘systemd’ is now used by the majority of recent Linux distributions, including Ubuntu. In the Ubuntu system, systemd is the default service manager that replaces the older init process.

Sponsored

This write up will be focusing on discussing the commands which can be used to list the services in Ubuntu. So, let’s begin:

Listing services using systemctl command in Ubuntu

The systemctl is a utility that is used to maintain the services of the system, the general syntax is mentioned below:

$ systemctl [OPTIONS] COMMAND>

When systemctl command is used without options it will list all Ubuntu services. Execute the command given below to get a list of all the services:

$ systemctl –no-pager

In the output we will get the following information:

UNIT: Corresponding details of systemd unit name are displayed.

LOAD: The information about the unit is displayed, whether or not it is currently loaded in memory.

ACTIVE: To check active status of system unit

SUB: To check running status of system unit

DESCRIPTION: Gives details about unit

Listing all unit files

Unit files are plain text ini-style files that contain information about a watched file system path, a start-up target, a socket, a device, a mount point and a timer controlled by the system, run the below-given command to list all unit files using systemctl:

$ systemctl list-units –all –type=service –no-pager

Listing systemd unit files

Instead of showing the type and running status of all accessible systemd unit files, the following will do so. Use the mentioned command to list all system unit files:

$ systemctl list-unit-files –no-pager


Search for specific unit file: Below mentioned is syntax to search for specific unit file using “grep”:

$ systemctl list-unit-files –no-pager | grep service_name

If you want to search for “snapd” then run the below mentioned command:

$ systemctl list-unit-files –no-pager | grep snapd

Sponsored

Above output shows all unit files which are related to “snapd” service.

Listing systemd service unit files by state(enabled/disabled)

On Ubuntu, the systemctl command will display information about all enabled systemd unit files by below mentioned command:

$ systemctl list-unit-files | grep enabled

On Ubuntu, the systemctl command will display information about all disabled systemd unit files by below mentioned command:

$ systemctl list-unit-files | grep disabled

Listing all Active and Running services

To list all running services run the below mentioned command:

$ systemctl list-units –all –type=services –no-pager | grep running

Listing all Excited services

To list all excited services run the below mentioned command, excited services are active services that do not find any daemon to monitor:

$ systemctl list-units –all –type=services –no-pager | grep excited

The output shows that currently there is no excited service in the system.

Listing all Dead services

To list all dead services run the below mentioned command:

$ systemctl list-units –all –type=services –no-pager | grep dead

Listing services using pstree command in Ubuntu

To list all running services of Ubuntu, run the below mentioned command:

$ pstree

How to list top control groups with resource utilization

Run the below mentioned command to list top control groups using “systemd-cgtop”:

$ systemd-cgtop


Conclusion

There are many services in a Ubuntu system that work in the background. These services are also known as daemons, they describe how the system works. We can list the Ubuntu services using different commands on the terminal. In this Article we discussed the listing of unit files, running, excited, dead, enabled, disabled services using “systemctl” command. Listing services using the “pstree” command is also mentioned. After comprehending this article you will be able to list different Ubuntu services successfully.

Ubuntu Server Admin

Recent Posts

New 50 TOPS DC-ROMA RISC-V AI PC ships with Ubuntu Desktop 24.04 LTS pre-installed

Canonical is excited to announce the launch of DeepComputing’s new 50 TOPS DC-ROMA RISC-V AI…

2 days ago

CRA compliance: Things IoT manufacturers can no longer do under the CRA (and what to do instead)

I’ve written about the EU Cyber Resilience Act (CRA) on our Canonical blog a few…

4 days ago

IBM LinuxONE 5 and Ubuntu Server, a great combination from day one

Today, IBM announced the launch of their latest server: the new IBM LinuxONE Emperor 5.…

5 days ago

Ubuntu Weekly Newsletter Issue 890

Welcome to the Ubuntu Weekly Newsletter, Issue 890 for the week of April 27 –…

5 days ago

Ubuntu IoT Day in Singapore – Unlock compliant and scalable innovation in edge AI

Singapore | May 27, 2025 | Full-day event How do you build robust, performant edge…

6 days ago