Today I Learned

2021/09/24

ubuntu

that you can find the version of debian used by your current ubuntu version by running cat /etc/debian_version. Even better, you can source /etc/os-release and get $ID and $VERSION_ID variables. Here’s what’s in the os-release for Ubuntu 20.04:

NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Sources: https://askubuntu.com/a/445496/505362 and the source code at https://dot.net/v1/dotnet-installer.sh