54

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

  • Does service --status-all do what you want? – Mark Plotnick Aug 7 '15 at 19:41
  • 1
    Check in /etc/init/ too if you are using upstart.. – heemayl Aug 7 '15 at 19:43
  • 1
    @MarkPlotnick, no plexmediaserver is still skipped – Alex Tartan Aug 7 '15 at 19:47
  • 2
    which Ubuntu release are you on? – heemayl Aug 7 '15 at 19:53
  • 1
    Have a look at /usr/lib/systemd/system too as the init is systemd in 15.04 .. – heemayl Aug 7 '15 at 20:07
82

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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.