# Obtaining Information ## obtainDistroInformation function called 1. [lsbReleaseInfo](#lsbreleaseinfo-function) function called 2. [osreleaseInfo](#osreleaseinfo-function) function called ### lsbReleaseInfo function - Gets information first from lsb, _lsbReleaseInfo_ is the function #### Info gathered - _lsbDescription_: `$(lsb_release -sd )` - Seems like a "Full name" - examples: - Linux Mint 19.1 Tessa - _lsbRelease_: `$(lsb_release -sr)` - examples - 19.1 (for Mint 19.1 Tessa) - _lsbCodename_: `$(lsb_release -sc)` - Codename on Ubuntu - examples: - tessa (for Linux Mint 19.1) - _lsbDistribID_: `$(lsb_release -si)` - examples: - LinuxMint ### osreleaseInfo function - Gets more info based on /etc/os-release, _osreleaseInfo_ is the function #### Info gathered - _OSRELEASE_NAME_: - code:`$(awk -F= '/^NAME=/ { print $2 }' /etc/os-release | tr -d \")` - examples: - "Manjaro Linux", - Fedora - (with double quotes) "Linux Mint" - *OSRELEASE_IDLIKE_: - code: `$(awk -F= '/^ID_LIKE=/ { print $2 }' /etc/os-release | tr -d \" )` - examples: - debian (for ubuntu) - ubuntu (for Linux Mint ) - _OSRELEASE_ID_ - code: `$(awk -F= '/^ID=/ { print $2 }' /etc/os-release | tr -d \")` - examples: - fedora - linuxmint - _OSRELEASE_VERSIONID_: - code;`$(awk -F= '/^VERSION_ID=/ { print $2 }' /etc/os-release | tr -d \")` - examples: - 36 # (Fedora) - 20.04 # (Ubuntu) - "19.2" (Mint .. includes double quotes) - _OSRELEASE_VERSION_ - code:`$(awk -F= '/^VERSION=/ { print $2 }' /etc/os-release | tr -d \")` - example: - "19.2 (Tina)" (with DQs for Linux Mint) - _Ubuntu specific check_ - OSRELEASE_UBUNTU_CODENAME: - code: `$(grep "^UBUNTU_CODENAME=" /etc/os-release | cut -d '=' -f 2 | sed 's/\"//g' )` - example: - focal - jammy