Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
linux-release-info
Advanced tools
Get Linux release info (distribution name, version, arch, release, etc.) from '/etc/os-release' file and from native os module. On Windows and Darwin it only returns common node os module info (platform, hostname, release and arch)
Get Linux release info (distribution name, version, arch, release, etc.) from '/etc/os-release' file and from native os module. On Windows and Darwin it only returns common node os module info (platform, hostname, release and arch)
###Highlights
npm install --save linux-release-info
const releaseInfo = require('linux-release-info')
releaseInfo()
.then(result => {
console.log(`You are using ${result.pretty_name} on a ${result.arch} machine`) // Distro name (only on linux) and arch info
console.log(result) // all data
})
.catch(err => console.error(`Error reading OS release info: ${err}`))
Outputs:
> You are using Ubuntu 17.10 on a x64 machine
Linux
{ type: 'Linux',
platform: 'linux',
hostname: 'VirtualBoxLINUX',
arch: 'x64',
release: '4.13.0-32-generic',
name: 'Ubuntu',
version: '17.10 (Artful Aardvark)',
id: 'ubuntu',
id_like: 'debian',
pretty_name: 'Ubuntu 17.10',
version_id: '17.10',
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: 'artful',
ubuntu_codename: 'artful' }
Linux (Raspberry Pi)
{ type: 'Linux',
platform: 'linux',
hostname: 'raspberrypi',
arch: 'arm',
release: '4.9.59-v7+',
pretty_name: 'Raspbian GNU/Linux 9 (stretch)',
name: 'Raspbian GNU/Linux',
version_id: '9',
version: '9 (stretch)',
id: 'raspbian',
id_like: 'debian',
home_url: 'http://www.raspbian.org/',
support_url: 'http://www.raspbian.org/RaspbianForums',
bug_report_url: 'http://www.raspbian.org/RaspbianBugs' }
Windows
{ type: 'Windows_NT',
platform: 'win32',
hostname: 'MYPC',
arch: 'x64',
release: '10.0.16299' }
Licensed under MIT
Copyright (c) 2018 [Samuel Carreira]
[1.0.0] - 2018-02-10
FAQs
Get Linux release info (distribution name, version, arch, release, etc.) from 'os-release' file and from native os module. On Windows and Darwin it only returns common node os module info (platform, hostname, release and arch)
We found that linux-release-info demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.