how we can see all running services Linux machine?

Viewed 10086

i have Linux [ Ubuntu Version 16.04 or Upper version ] machine and i want to see How many service running right now and how many service is install using 1 command or minimum command of use, so how can i see ?

1 Answers

List services

service

The service --status-all command will list all services on your Ubuntu Server (Both running services and Not running Services).

service  --status-all

Using the grep command, we can filter the output to show only the running services.

service --status-all | grep '\[ + \]'

To list ubuntu services that are not running, Type,

service --status-all | grep '\[ - \]'

The service command can be used to list services in all Ubuntu releases, including (Ubuntu 17, 16.04, and 14.04).

systemctl

To list all running services on Ubuntu, Type:

systemctl list-units

Count

running services

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

not running services

service --status-all | grep -c '\[ - \]'

all services

service --status-all | grep -c ''
Related