How to list all services on an Ubuntu 16.04 system

Ubuntu FAQ: How do I list all of the services on my Ubuntu 16.04 system from the Linux command line?

Answer: Use this command:

service --status-all

Here’s an example of what this looks like on an Ubuntu 16.04.2 LTS system:

root> service --status-all

[ + ]  apache-htcacheclean
[ + ]  apache2
[ + ]  apparmor
[ - ]  bootmisc.sh
[ - ]  checkfs.sh
[ - ]  checkroot-bootclean.sh
[ - ]  checkroot.sh
[ + ]  console-setup
[ + ]  cron
[ + ]  dbus
[ - ]  hostname.sh
[ - ]  hwclock.sh
[ + ]  irqbalance
[ + ]  keyboard-setup
[ - ]  killprocs
[ + ]  kmod
[ - ]  mountall-bootclean.sh
[ - ]  mountall.sh
[ - ]  mountdevsubfs.sh
[ - ]  mountkernfs.sh
[ - ]  mountnfs-bootclean.sh
[ - ]  mountnfs.sh
[ + ]  mysql
[ + ]  networking
[ + ]  nginx
[ + ]  ondemand
[ - ]  plymouth
[ - ]  plymouth-log
[ + ]  procps
[ + ]  rc.local
[ + ]  resolvconf
[ - ]  rsync
[ + ]  rsyslog
[ - ]  sendsigs
[ + ]  ssh
[ + ]  sysstat
[ + ]  udev
[ + ]  ufw
[ - ]  umountfs
[ - ]  umountnfs.sh
[ - ]  umountroot
[ + ]  urandom
[ - ]  uuidd

The meaning of the Ubuntu service command output

From the Ubuntu Linux service man page:

service --status-all runs all init scripts, in alphabetical order, with the status command. The status is:

  • [ + ] for running services
  • [ - ] for stopped services
  • [ ? ] for services without a 'status' command

This option only calls status for sysvinit jobs; upstart jobs can be queried in a similar manner with initctl list.

How to show the Ubuntu version

In a slightly-related note, you can show your Ubuntu version information with the lsb_release -a command:

root> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:    16.04
Codename:   xenial

Summary

In summary, if you wanted to see how to list all of the services on an Ubuntu 16.04 system, I hope this is helpful.

Add new comment

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.