sernum
v1.0.0
Published
Reads the machine's serial number
Downloads
85
Maintainers
Readme
sernum
Reads the machine's serial number. Supports Linux, Mac (OS X), Windows, and FreeBSD.
Install
$ npm install sernum
And/or install globally for a sernum
shell command:
$ [sudo] npm install -g sernum
Usage
The serial number value is retrieved from the system asynchronously and return with a promise.
const sernum = require('sernum');
sernum().then(val => console.log(val));
To prefix the system command with sudo
use the sudo
method:
sernum.sudo().then(val => console.log(val));
For the CLI command it's just
$ sernum
ABC123DEF456
Creds
License
MIT © Yuan Tao