How to List  Running Services on Debian 12

Running services are the processes that are running in the background of the computer for different purposes. Some of these services are known as the system services such as daemon services. Others are related to different installed application software such as Apache web server. 

Some services are running from the boot of the computer and some start running when the application is launched. However, the running services make the processor busy due to which other services can be processed slowly. 

To monitor which services are being run on the computer, it is important to list them down on the screen. After listing the services, it is advised to stop the running services which are not required. This action will optimize the processor load and enhance its performance. 

There are multiple methods to list down the running services on Debian. These methods are demonstrated in this post following the below-mentioned outline:

  1. What are the Ways to List Down the Running Services on Debian Linux
  2. Method 1: List Running Services on Debian Using the systemctl Command
  3. Method 2: List Running Services on Debian Using the pstree Command
  4. Method 3: List Down the Running Services of the Firewall on Debian
  5. Method 4: List Running Services on Debian Using the service Command

What are the Ways to List Down the Running Services on Debian Linux?

All the methods to list down the running services on Debian are explained with their usage demonstration in this section. 

Method 1: List Running Services on Debian Using the systemctl Command

The systemctl command is used to manage the services such as to start, stop on Debian and its derivative distributions. To list down all the running services on Debian 12, use the command:

$ systemctl --type=service --state=running

By specifying the “running” state in the above command, all the running services are being displayed on the screen. 

If the user wants to identify the active running services only, then execute the command:

$ sudo systemctl list-units --type=service --state=active

This will display the running services which are active at the time of the command being executed.

Method 2: List Running Services on Debian Using the pstree Command

Another method to display the running services on Debian is by using the pstree command. This command displays the output in the representation of the tree which is easily understood by the users. 

To display the running running services with the pstree command, run the command:

$ pstree

It can be seen from the output displayed on the screen, that all the running services are shown in the form of a tree. 

Method 3: List Down the Running Services of the Firewall on Debian

To list down the firewall services that are in running state, execute the next mentioned command:

$ sudo firewall-cmd --list-services

If the command is not installed, use the below-mentioned command to install firewall-cmd on Debian:

$ sudo apt install firewalld -y

Method 4: List Running Services on Debian Using the service Command

The service command is used to display the status of all the services on the computer by using the command:

$ sudo service --status-all

The output will display all the services and the services having the “+” sign are running on the computer. On the other hand, services with the “” sign are stopped and not running on the computer. 

To count the number of the running services, use the grep command along with the service command as shown:

$ sudo service --status-all | grep -c '\[ + \]'

These are five different methods to find out the running services on Debian Linux. 

Conclusion

To list the running services on Debian 12, users can use the pstree command, service command, and the systemctl command. Users can also list down the firewall running services by using the firewall-cmd command. 

This post has explained all the above-mentioned methods with a demonstration of the commands for the user’s better understanding.