distro {distro} | R Documentation |
Get info on the system's Linux distribution
Description
Get info on the system's Linux distribution
Usage
distro()
Value
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 theyy.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
.
Examples
distro()
[Package distro version 0.1.0 Index]