In this blog, methods of listing down different types of services in Ubuntu have been explained.
How to List Services in Ubuntu
There is a “systemctl” utility that can be used to list down services on Ubuntu as well as to manage them by a stop or starting those services. The general syntax of using the systemctl command is:
The explanation of the general syntax of using the systemctl command:
- Use the systemctl command
- Use any of systemctl options
- Type the action you want to perform
We will understand its usage with some examples.
How to List All Services on Ubuntu
To list down all the services that are being run on Ubuntu, we will use the action of “–no-pager” without any options:
All the services are being displayed with their service status like in the above output, 261 loaded services are listed.
How to List down All the Unit Files on Ubuntu Jammy Jellyfish
The unit files are the text files containing information like start-up target, socket, device name, and a watched file system path. These unit files can be displayed on the screen by running the command:
177 loaded files are listed down in the output of the above-executed command.
How to List Services State in Ubuntu 22.04
To list down only the states of the services, whether they are enabling or disabled, also if they are in other states, we will run the command:
In the above output, it can be seen that the status of every service has been displayed.
The systemctl utility, which is available by default in Ubuntu, can be used to list services in Ubuntu 22.04 using the command “systemctl –no-pager”. In this blog, different types of options have been used to list down the services on Ubuntu 22.04.