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 X OS/Host serial number
build X X X OS build version
servicepack X service pack 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 of
node and dev software packages
kernel X X X X X os kernel version
openssl X X X X X node openssl version
systemOpenssl X X X X X os openssl version
systemOpensslLib X X X X X openSSL, LibreSSL, ...
node X X X X X node version
v8 X X X X X v8 version
npm X X X X X npm version
yarn X X X X X yarn version
pm2 X X X X X pm2 version
gulp X X X X X gulp version
grunt X X X X X grunt version
git X X X X X git version
tsc X X X X X typescript version
mysql X X X X X mysql version
redis X X X X X redis version
mongodb X X X X X mongodb version
apache X X X X X apache version
nginx X X X X X nginx version
php X X X X X php version
docker X X X X X docker version
postfix X X X X X postfix version
postgresql X X X X X postgresql version
perl X X X X X perl version
python X X X X X python version
python3 X X X X X python3 version
java X X X X X java version
gcc X X X X X gcc version
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