Get info on the system's Linux distribution
distro()
On Linux distributions, it returns a list of four elements:
id
, e.g. "ubuntu", "debian"
version
, e.g. "18.04", "7.7.1908"
codename
, e.g. "bionic", "bullseye"
short_version
, which for Ubuntu is the yy.mm
version ("18.04") but for
all other distributions is the major version number only ("7")
Not all fields are guaranteed to be defined on all systems. On non-Linux
systems, the function returns NULL
.
distro()#> NULL