Skip to content

How to List all Running Services on Ubuntu

If you need to view a list of all the services that are either running or stopped (or both) on an Ubuntu server, then you can use the following command:

service --status-all
Code language: Bash (bash)

This will print out a list of services that may look something like this:

# service --status-all [ - ] acpid [ + ] apache-htcacheclean [ + ] apache2 [ + ] apparmor [ + ] apport [ + ] atd [ - ] console-setup.sh [ + ] cron [ - ] cryptdisks [ - ] cryptdisks-early [ + ] datadog-agent [ + ] datadog-agent-process [ + ] datadog-agent-trace [ + ] dbus [ - ] docker
Code language: Bash (bash)

Only show Running Services in Ubuntu

If you are only interested in the running services, then we can filter by the [ + ] items:

service --status-all | grep '\[ + \]'
Code language: Bash (bash)

This will show the following:

# service --status-all | grep '\[ + \]' [ + ] apache-htcacheclean [ + ] apache2 [ + ] apparmor [ + ] apport [ + ] atd [ + ] cron [ + ] datadog-agent [ + ] datadog-agent-process [ + ] datadog-agent-trace [ + ] dbus [ + ] ebtables
Code language: Bash (bash)

This prints out a reduced list of only the running services.

Only show Stopped Services in Ubuntu

The opposite is also true, we can also show a list of all stopped services:

service --status-all | grep '\[ - \]'
Code language: Bash (bash)

This will show the following:

# service --status-all | grep '\[ - \]' [ - ] acpid [ - ] console-setup.sh [ - ] cryptdisks [ - ] cryptdisks-early [ - ] docker
Code language: Bash (bash)

See also  [Solved] dial tcp: lookup proxy.golang.org: i/o timeout
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x