3 ms·
If you are on a systemd system, you can check your version with $ init --version systemd 231 +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK -SYSVINIT +
by lclarkmichalek 10y ago
If you are on a systemd system, you can check your version with
$ init --version
systemd 231
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT -GNUTLS -ACL +XZ -LZ4 +SECCOMP +BLKID -ELFUTILS +KMOD -IDN
- mhotchen 10y agoDespite being in the man page, the flag --version didn't work for me on Ubuntu 16.04 (various different installations): $ init --version init: unrecognised option '--version' systemd --version works though: $ systemd --version systemd 229
- JdeBP 10y agoOn a systemd operating system there may or may not be a program called "init" and it may or may not be an alias for a systemd program. (One's operating system could be one of the ones that just invokes "/lib/systemd/systemd" directly without an "init" at all; or "init" could be Upstart or van Smoorenburg init or the nosh system manager; and of course just running unadorned "init" assumes that "/sbin" is on an unprivileged user's PATH.) The best command to invoke here is either "systemctl" or "systemd".