Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a command to list services that run on startup? I imagine it would involve parsing /etc/init.d/, and the various /etc/rc.* directories.

share|improve this question
up vote 74 down vote accepted

You can simply use the initctl list shell command to list the contents of /etc/init rather than the suggested dbus-send command.

share|improve this answer

The /etc/init.d and /etc/rc.* directories have been superseded by the 'upstart' init tool. Although scripts in these directories will be executed as expected, the new method for running things on init is defined by files in /etc/init/

You can list all of the upstart jobs with by querying upstart over dbus:

dbus-send --print-reply --system --dest=com.ubuntu.Upstart \
        /com/ubuntu/Upstart com.ubuntu.Upstart0_6.GetAllJobs

You may have to change 0_6 to reflect the version of upstart you have. This command works on my lucid install.

share|improve this answer
@Eric H: Could your set the answer below as correct instead - initctl list is much nicer than this dbus command. I'd like to leave this answer here for reference (rather than deleting it completely) though. – Jeremy Kerr Feb 24 '11 at 4:48

If you want a nice graphical representation of services and time it takes to boot try:

apt-get install bootchart
share|improve this answer

Id use initctl show-config <servicename> to really get the details of when/if your service will start during boot.

Like so:

$ initctl show-config myservice
  start on runlevel [2345]
  stop on runlevel [!2345]

Or for NFS4 idmap-daemon:

$ initctl show-config idmapd
  start on (local-filesystems or mounting TYPE=nfs4)
  stop on runlevel [06]

chkconfig is only preferable on RedHat based systems imho.

share|improve this answer

The quick answer is: It depends on your init system.

The long answer is: For current versions of Ubuntu, you probably have a mix of Upstart, and SystemV. Newer versions of Ubuntu after 15.04 "Vivid Vervet" (and other Linux distros like RHEL/CentOS 7) are moving to use SystemD.


To list all services:

initctl list

To list all Upstart services and run initctl show-config on them, this one-liner may be helpful:

initctl list | awk '{ print $1 }' | xargs -n1 initctl show-config

System V

To list all services:

service --status-all


# for init scripts:
ls /etc/init.d/

# for runlevel symlinks:
ls /etc/rc*.d/


To list all services:

systemctl list-unit-files --type=service


ls /lib/systemd/system/*.service /etc/systemd/system/*.service
share|improve this answer

On 12.04 we could use:

sudo apt-get install chkconfig
chkconfig --list

but it was removed in 12.10.

Sample output:

acpi-support              0:off  1:off  2:on   3:on   4:on   5:on   6:off
acpid                     0:off  1:off  2:off  3:off  4:off  5:off  6:off
apparmor                  0:off  1:off  2:off  3:off  4:off  5:off  6:off  S:on
share|improve this answer
Doesn't work in Ubuntu.… – A.B. Apr 24 '15 at 7:21
@A.B. thanks for letting me know! It is rare for downvoters to comment nowadays: it requires courage and allows me to learn. updated with the version it works in. – Ciro Santilli 巴拿馬文件 六四事件 法轮功 Apr 24 '15 at 7:58
+1 for your changes – A.B. Apr 24 '15 at 7:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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