OS

In this section you will learn how to get information about the installed operating system, versions of installed development specific software packages, shell and users online:

For function reference and examples we assume, that we imported systeminformation as follows:

const si = require('systeminformation');

Operating System, Shell, Versions, Users

All functions in this section return a promise or can be called with a callback function (parameter cb in the function reference)

Function Result object Linux BSD Mac Win Sun Comments
si.osInfo(cb) {...} X X X X X OS information
platform X X X X X 'Linux', 'Darwin', 'Windows'
distro X X X X X
release X X X X X
codename X
kernel X X X X X kernel release - same as os.release()
arch X X X X X same as os.arch()
hostname X X X X X same as os.hostname()
codepage X X X X OS build version
logofile X X X X X e.g. 'apple', 'debian', 'fedora', ...
serial X X X OS/Host serial number
build X X OS build version
si.uuid(cb) {...} X X X X X object of several UUIDs
os X X X X os specific UUID
si.shell(cb) : string X X X standard shell
si.versions(cb) {...} X X X X X version information (kernel, ssl, node, ...)
si.users(cb) [{...}] X X X X X array of users online
[0].user X X X X X user name
[0].tty X X X X X terminal
[0].date X X X X X login date
[0].time X X X X X login time
[0].ip X X X X ip address (remote login)
[0].command X X X X last command or shell