How to find out what init mode system is using?

I was looking at this and I'm not sure how to find out which startup service is used on my machine (Ubuntu 14.04 on Digital Ocean). Can it use all of them? (upstart, system v, systemd)

https://www.digitalocean.com/community/tutorials/how-to-configure-a-linux-service-to-start-automatically-after-a-crash-or-reboot-part-1-practical-examples


Solution 1:

Ubuntu 14.04 only uses Upstart. Ubuntu 15.04 onwards use systemd, but on 15.04 you can switch to Upstart. Both Upstart and systemd support sysv init scripts for backward compatibility.

The Ubuntu Wiki article on Systemd for Upstart users gives this command for identifying the current init system:

ps -p1 | grep systemd && echo systemd || echo upstart

This should always return upstart on 14.04 or 12.04 (the currently supported versions of Ubuntu not using systemd).