Returns parsed key-value pairs from /etc/os-release on Linux, or null on other platforms or when the file is absent.
/etc/os-release
null
import { linuxRelease } from "@darthcav/ts-utils"const info = linuxRelease()if (info) console.log(info.PRETTY_NAME) // e.g. "Ubuntu 24.04 LTS" Copy
import { linuxRelease } from "@darthcav/ts-utils"const info = linuxRelease()if (info) console.log(info.PRETTY_NAME) // e.g. "Ubuntu 24.04 LTS"
Returns parsed key-value pairs from
/etc/os-releaseon Linux, ornullon other platforms or when the file is absent.