https://github.com/samuelmaddock/linux-os-release
Reads Linux operating system identification data
https://github.com/samuelmaddock/linux-os-release
Last synced: 11 months ago
JSON representation
Reads Linux operating system identification data
- Host: GitHub
- URL: https://github.com/samuelmaddock/linux-os-release
- Owner: samuelmaddock
- Created: 2025-07-08T18:35:01.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-08T18:36:07.000Z (12 months ago)
- Last Synced: 2025-07-08T18:52:48.585Z (12 months ago)
- Language: TypeScript
- Size: 0 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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](https://www.freedesktop.org/software/systemd/man/latest/os-release.html).
## Installation
```bash
npm install linux-os-release
```
## Usage
```js
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