69

This question is very similar to this one: List of available services

For my specific case, I'm wondering if there is a specific command to show the full list of services under Ubuntu.

I did run a ls /etc/init.d and it does show a pretty comprehensive list, but some entries are missing. I did see apache2, myslq, gdm, and a whole lot of others.

But some of them are missing. One example is plexmediaserver (I've installed plex server recently and had some difficulties in finding the name of it's service)

So to rephrase this question in as few words as possible:
Is there a way to get the full list of possibilities of {x} for

service {x} status

Note: using Ubuntu 15.04

Alex Tartan
  • 1,449

2 Answers2

104

Since Ubuntu has recently switched over to systemd, some services will be listed by upstart.

service --status-all

and others, by systemd

systemctl -l --type service --all

or as root

systemctl -r --type service --all

However software still using the init system will likely be listed in

/etc/init.d

Looking through all of those will yield most services registered on the system.

There is a good summary on systemd over on the Arch wiki

Evgeny
  • 5,476
John Pettit
  • 1,228
7

You'll need a combination of commands, depending on your Ubuntu version. Before systemd became the init system (pre-15.04), the following would suffice:

service --status-all # for sysv init scripts
initctl list         # for Upstart jobs

Some services might be listed by both service and initctl, in which case the Upstart job would usually be the right one.

For the case of systemd, John Petit's answer provides the necessary commands.

muru
  • 72,889