How to find out the systemd version on Raspbian

How can I find the systemd version that came as part of my linux (raspbian) installation?

On running lsb_release -a, I get the linux (raspbian) version information as follows

Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.1 (stretch)
Release: 9.1
Codename: stretch


Solution 1:

Ask it:

$ /sbin/init --version
systemd 123

$ systemctl --version
systemd 123

You can also ask the package manager:

$ dpkg -l systemd
||/ Name              Version       Architecture  Description
+++-=================-=============-=============-========================================
ii  systemd           123-1         amd64         system and service manager

If you think the files might have been upgraded since, you can ask the running process:

$ busctl --system get-property org.freedesktop.systemd1 \
                               /org/freedesktop/systemd1 \
                               org.freedesktop.systemd1.Manager \
                               Version
s "123"