23

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

1
  • Downvoted because no effort was shown to answer a basic question which has basically the same answer for most any software package. The answer is even right in "man systemd" if you search in there for "version". Jan 4, 2018 at 15:18

1 Answer 1

34

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"
2
  • 4
    On Raspbian Stretch Lite, I get /sbin/init: unrecognized option '--version'. Even though the man page says this is a valid option.
    – Elliott B
    Jun 25, 2018 at 3:13
  • 3
    On many systems, /sbin/init is a symbolic link to ../lib/systemd/systemd and the --version option is recognized only if the binary is called directly like /lib/systemd/systemd --version Apr 26, 2020 at 0:15

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.