If you should view an inventory of all of the companies which can be both operating or stopped (or each) on an Ubuntu server, then you need to use the next command:
service --status-all
This can print out an inventory of companies that will look one thing 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
Solely present Operating Companies in Ubuntu
In case you are solely within the operating companies, then we will filter by the [ + ] gadgets:
service --status-all | grep '[ + ]'
This can present the next:
# service --status-all | grep '[ + ]'
[ + ] apache-htcacheclean
[ + ] apache2
[ + ] apparmor
[ + ] apport
[ + ] atd
[ + ] cron
[ + ] datadog-agent
[ + ] datadog-agent-process
[ + ] datadog-agent-trace
[ + ] dbus
[ + ] ebtables
This prints out a decreased listing of solely the operating companies.
Solely present Stopped Companies in Ubuntu
The alternative can be true, we will additionally present an inventory of all stopped companies:
service --status-all | grep '[ - ]'
This can present the next:
# service --status-all | grep '[ - ]'
[ - ] acpid
[ - ] console-setup.sh
[ - ] cryptdisks
[ - ] cryptdisks-early
[ - ] docker