list services on startup | initctl list | service --status-all | systemctl list-unit-files --type=service

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.

Upstart

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
OR:
# for init scripts:
ls /etc/init.d/

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

SystemD

To list all services:
systemctl list-unit-files --type=service
OR:
ls /lib/systemd/system/*.service /etc/systemd/system/*.service

Comments

Popular posts from this blog

HAproxy logging

teamcity Automatic Agent Start under Linux

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all