Skip to main content

os

Description

Operating system information

Fields

IDTYPEDESCRIPTION
namestringPretty hostname on macOS/Linux or device name on Windows
envmap[string]stringENV variable contents
path[]stringPATH variable contents
uptimetimeCurrent uptime
updates[]os.updateList of available OS updates
rebootpendingboolWhether a reboot is pending
hostnamestringHostname for this OS
machineidstringMachine ID for this OS

Examples

Show all environment variables

os.env

Retrieve a single environment variable

os.env['windir']