Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

5 Answers 5

up vote 46 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
sudo apt-get install chkconfig
chkconfig --list

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

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

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.