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.


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


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:

sudo initctl list

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

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

System V

To list all services:

sudo service --status-all


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

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


To list all services:

sudo systemctl list-unit-files --type=service


ls /lib/systemd/system/*.service /etc/systemd/system/*.service
  • 13
    This should be the accepted answer. – sjas Dec 6 '16 at 13:02
  • 1
    service --status-all does NOT show whether services are enabled to start on boot, at least not on Ubuntu 16. It shows whether services are currently running or not. – Wildcard Apr 18 '19 at 21:35
  • 1
    I had to sudo service --status-all to get all of the services to show up. A few were hidden when I only ran service --status-all on a non-root account. – Phlucious May 23 '19 at 16:30
  • @Phlucious : Thanks for mentioning that. I assumed it was well known that these commands are usually run as root (systemctl, service, initctl...) as they are usually considered system administration commands. – TrinitronX Jun 11 '19 at 19:56
  • service --status-all This command worked in my debian box too – Arun Aug 14 '20 at 4:53

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.

  • 3
    @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

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.

  • 1
    This is the correct answer. I have no idea why all the wrong and incomplete answers are so highly upvoted. – Cerin Sep 8 '16 at 15:35
  • 1
    This doenst work for people using SysV, I agree this it a good answer but it is incomplete. – Gabriel Netto Dec 12 '16 at 12:59

For Ubuntu 18.04 use :

systemctl list-units --type=service

instead of :


As from Ubuntu 16.04, initctl has been replaced by systemd. https://www.linuxtricks.fr/wiki/systemd-les-commandes-essentielles (FR_fr)

(If it can help @sanjay-manohar )


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

Besides system services and scripts under:


There are probably AutoStart Applications too, for example:

find / -name "*autostart*"

ls -1 "/etc/xdg/autostart" "/home/$USER/.config/autostart" "/usr/share/gdm/autostart"  "/usr/share/gnome/autostart"

Using gawk:

ls -l /etc/rc*.d/* | gawk 'match($0, /rc([0-6S]).d.*\/(.*)$/, a) {l[a[2]]=l[a[2]]a[1]","}; END{for(v in l){print v,substr(l[v],1,length(l[v])-1)}}'

Sample output:

$ ls -l /etc/rc*.d/* | gawk 'match($0, /rc([0-6S]).d.*\/(.*)$/, a) {l[a[2]]=l[a[2]]a[1]","}; END{for(v in l){print v,substr(l[v],1,length(l[v])-1)}}' | egrep README
README 0,1,2,3,4,5,6,S

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.