node:os API Reference

Platform, resource, user, and network-interface information

Elide provides the standard node:os namespace, including:

  • platform information: arch, platform, type, endianness, machine, release, and version
  • paths and host data: tmpdir, homedir, hostname, userInfo, and networkInterfaces
  • resource data: availableParallelism, cpus, freemem, totalmem, uptime, loadavg, getPriority, and setPriority
  • EOL, devNull, and constants
import os from "node:os";

console.log(os.platform(), os.arch());
console.log(os.userInfo().username);
console.log(os.tmpdir());

userInfo({ encoding: "buffer" }) returns Buffer values for username, home directory, and shell. networkInterfaces() returns records with address, netmask, family, MAC address, loopback state, CIDR, and IPv6 scope ID.

Some resource values are compatibility placeholders in Elide 1.5.0: CPU records use model unknown, zero speeds/times, and uptime() / loadavg() may report zeros rather than host-wide measurements.

See the Node.js os documentation for standard return shapes.