Learn R Programming

distro (version 0.1.0)

distro: Get info on the system's Linux distribution

Description

Get info on the system's Linux distribution

Usage

distro()

Arguments

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 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.

Examples

Run this code
# NOT RUN {
distro()
# }

Run the code above in your browser using DataLab