linux-os-release
v0.1.0
Published
Reads Linux operating system identification data
Downloads
1,890
Maintainers
Readme
linux-os-release
A Node.js library for reading Linux operating system identification data from /etc/os-release and /usr/lib/os-release files according to the freedesktop.org specification.
Installation
npm install linux-os-releaseUsage
import { readLinuxOSReleaseInfo } from 'linux-os-release';
// Read OS release info from standard locations
const osInfo = await readLinuxOSReleaseInfo();
console.log(osInfo);
// Output example:
// {
// NAME: 'Ubuntu',
// VERSION: '20.04.1 LTS (Focal Fossa)',
// ID: 'ubuntu',
// ID_LIKE: 'debian',
// PRETTY_NAME: 'Ubuntu 20.04.1 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'
// }License
MIT
