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', 'win32', ... | |
| distro | X | X | X | X | X | ||
| release | X | X | X | X | X | ||
| codename | X | 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() | |
| fqdn | X | X | X | X | X | fully qualfied domain name | |
| 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 | |||||
| uefi | X | X | X | X | OS uses UEFI on startup | ||
| installDate | X | X | X | X | OS installation date | ||
| lastUpdate | X | X | X | X | date of the last OS update (see notes) | ||
| hypervizor | X | hyper-v detected (win only) | |||||
| remoteSession | X | runs in remote session (win only) | |||||
| displayServer | X | X | X | X | display server in use | ||
| awake | X | X | X | X | X | system is fully awake (macOS: false during dark wake, see notes) | |
| hwAcceleration | X | X | X | X | available compute layers (see notes) | ||
Example
{
platform: 'darwin',
distro: 'macOS',
release: '26.5.2',
codename: 'Tahoe',
kernel: '25.5.0',
arch: 'arm64',
hostname: 'MacBook-Pro.local',
fqdn: 'MacBook-Pro.local',
codepage: 'UTF-8',
logofile: 'apple',
serial: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',
build: '25F84',
servicepack: '',
uefi: true,
installDate: '2026-06-11T00:00:00.0000',
lastUpdate: '2026-07-09T22:44:10.000Z',
displayServer: 'quartz',
awake: true,
hwAcceleration: [ 'metal', 'opencl' ]
}
|
|||||||
| si.shell(cb) | : string | X | X | X | X | X | standard shell |
| si.versions(apps, cb) | { ...} | X | X | X | X | X | version information of node and dev software packages optional apps param (string, comma or space seperated) only those apps are detected |
| 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 | |
| angular | X | X | X | X | X | angular cli version | |
| apache | X | X | X | X | X | apache version | |
| bash | X | X | X | X | X | bash version | |
| bun | X | X | X | X | X | bun version | |
| cargo | X | X | X | X | X | cargo version | |
| composer | X | X | X | X | X | composer version | |
| curl | X | X | X | X | X | curl version | |
| deno | X | X | X | X | X | deno version | |
| docker | X | X | X | X | X | docker version | |
| dockerCompose | X | X | X | X | X | docker compose version | |
| dotnet | X | dotnet version | |||||
| fish | X | X | X | X | X | fish version | |
| gcc | X | X | X | X | X | gcc version | |
| git | X | X | X | X | X | git version | |
| go | X | X | X | X | X | go version | |
| gradle | X | X | X | X | X | gradle version | |
| grunt | X | X | X | X | X | grunt version | |
| gulp | X | X | X | X | X | gulp version | |
| herd | X | X | X | X | X | laravel herd version | |
| homebrew | X | X | X | X | X | homebrew version | |
| java | X | X | X | X | X | java version | |
| laravel | X | X | X | X | X | laravel installer version | |
| maven | X | X | X | X | X | maven version | |
| mongodb | X | X | X | X | X | mongodb version | |
| mysql | X | X | X | X | X | mysql version | |
| nginx | X | X | X | X | X | nginx version | |
| npm | X | X | X | X | X | npm version | |
| perl | X | X | X | X | X | perl version | |
| php | X | X | X | X | X | php version | |
| pip3 | X | X | X | X | X | pip3 version | |
| pip | X | X | X | X | X | pip version | |
| pm2 | X | X | X | X | X | pm2 version | |
| podman | X | X | X | X | X | podman version | |
| postfix | X | X | X | X | X | postfix version | |
| postgresql | X | X | X | X | X | postgresql version | |
| powershell | X | powershell version | |||||
| python3 | X | X | X | X | X | python3 version | |
| python | X | X | X | X | X | python version | |
| rails | X | X | X | X | X | ruby on rails version | |
| redis | X | X | X | X | X | redis version | |
| ruby | X | X | X | X | X | ruby version | |
| rust | X | X | X | X | X | rust (rustc) version | |
| sqlite3 | X | X | X | X | X | sqlite3 version | |
| tsc | X | X | X | X | X | typescript version | |
| virtualbox | X | X | X | X | X | virtualbox version | |
| vi | X | X | X | X | X | vi version (incl. vim banner) | |
| vim | X | X | X | X | X | vim version | |
| vue | X | X | X | X | X | vue cli version | |
| yarn | X | X | X | X | X | yarn version | |
| zsh | X | X | X | X | X | zsh version | |
Example
{
kernel: '25.5.0',
openssl: '3.5.6',
systemOpenssl: '3.6.2',
systemOpensslLib: 'OpenSSL',
node: '24.16.0',
v8: '13.6.233.17-node.49',
angular: '22.1.6',
apache: '2.4.66',
bash: '3.2.57',
bun: '1.4.0',
cargo: '',
composer: '2.10.2',
curl: '8.7.1',
deno: '2.9.3',
docker: '29.5.3',
dockerCompose: 'v5.1.4',
dotnet: '',
fish: '',
gcc: '21.0.0',
git: '2.50.1',
go: '',
gradle: '',
grunt: '',
gulp: '',
herd: '1.30.0',
homebrew: '6.0.18',
java: '',
laravel: '5.31.1',
maven: '',
mongodb: '',
mysql: '',
nginx: '',
npm: '11.13.0',
perl: '5.34.1',
php: '8.5.8',
pip3: '26.1.2',
pip: '26.1.2',
pm2: '',
podman: '',
postfix: '3.2.2',
postgresql: '',
powershell: '',
python3: '3.13.13',
python: '',
rails: '',
redis: '',
ruby: '2.6.10p210',
rust: '',
sqlite3: '3.51.0',
tsc: '6.0.3',
virtualbox: '',
vi: 'VIM - Vi IMproved 9.1',
vim: '9.1',
vue: '',
yarn: '',
zsh: '5.9'
}
Example 2
{
npm: '6.13.6',
php: '7.3.11',
postgresql: '12.1'
}
|
|||||||
| 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 | ||
Example
[
{
user: 'yourname',
tty: 'ttys006',
date: '2020-02-01',
time: '21:20',
ip: '',
command: 'w -ih'
},
{
user: 'othername',
tty: 'ttys008',
date: '2020-02-01',
time: '21:20',
ip: '',
command: '-bash'
}
]
|
|||||||
Hardware acceleration / compute layers
osInfo().hwAcceleration lists the GPU compute layers available on the machine, e.g. [ 'cuda', 'vulkan', 'opencl' ]. This is useful to decide which build of a native library (llama.cpp, ONNX Runtime, ...) can be installed. Detection is done by looking up the runtime libraries of each layer in the usual search paths - no external tool is called and no root is needed (about 0.2 ms):
| Layer | Linux / BSD | Windows | macOS |
|---|---|---|---|
| cuda | libnvidia-ml.so[.1] and libcudart.so[.11|.12|.13] | nvml.dll and cudart64_ { 11,12,13}.dll | - |
| rocm | libamdhip64.so, librocm_smi64.so | - | - |
| oneapi | libze_loader.so[.1] | ze_loader.dll | - |
| vulkan | libvulkan.so[.1] | vulkan-1.dll | libvulkan.dylib, libMoltenVK.dylib |
| opencl | libOpenCL.so[.1] | OpenCL.dll | OpenCL.framework |
| metal | - | - | Metal.framework |
| dx12 | - | d3d12.dll | - |
| directml | - | DirectML.dll | - |
Searched are the library directories of the platform (Linux additionally LD_LIBRARY_PATH, /usr/local/cuda/lib64, /opt/rocm/lib, /opt/intel/oneapi/lib; Windows System32, SysWOW64, CUDA_PATH and the vendor entries of PATH). cuda is only reported when driver and runtime are present, as only then it is actually usable. SunOS always returns an empty array.
This tells you that the library of a layer is installed - it is not a capability check of the GPU. dx12 in particular: d3d12.dll ships with every Windows 10 and later, so it says nothing about the feature level your graphics card supports.
Last system update
osInfo().lastUpdate is the point in time the operating system was last updated (null if it cannot be determined). The version this update brought the system to is the one you are running, so it is already in release. As there is no common concept across operating systems, the sources differ:
- macOS: newest macOS ... entry in /Library/Receipts/InstallHistory.plist - so only real OS updates (e.g. 26.5.1 to 26.5.2), installer packages of other software are ignored
- Windows: install date of the latest OS update (Get-HotFix, limited to entries described as update) - Windows only reports the date, so the time part is 00:00:00
- Linux: newest modification time of the package manager logs / databases (apt, dpkg, rpm, dnf, yum, zypper, pacman, apk, portage)
- BSD: newest modification time of the pkg database and freebsd-update data
On Linux and BSD there is no single OS version that gets updated - a rolling package manager updates hundreds of packages independently. There lastUpdate is therefore the last time anything was installed or updated by the package manager.
Windows caveat: Get-HotFix lists the servicing patches (KB) of the machine, which can also include e.g. .NET Framework updates - the date may therefore belong to a KB that did not raise the build revision of Windows itself.
System sleep / awake state
osInfo().awake tells you whether the system is fully awake. While a system is suspended, all processes are frozen and cannot run - so on Linux, BSD and SunOS this value is always true while your code is executing.
macOS is different: during a dark wake (e.g. lid closed, maintenance or push wake) the system runs for short periods without graphics and with unreliable networking, while node apps do run. In this state awake is false, so you can postpone work until the system is fully awake again. It is derived from the current system power capabilities (pmset -g systemstate).
On Windows awake is always true: classic sleep (S3) freezes all processes, and Modern Standby (S0 low power idle) cannot be reliably detected from user space.