Platform reference¶
PLATFORM_ID ¶
A short identifier for the current platform. Known values:
linux
windows
macos
PLATFORM_NAME ¶
The human readable name of the current platform. Known values:
- Linux
- Windows
- macOS
DEFAULT_SHELL ¶
The default shell for the current platform. Values are taken from environment variables, with platform-specific fallbacks.
Platform | Environment variables | Fallback |
---|---|---|
linux | SHELL | bash |
windows | SHELL , COMSPEC | cmd |
macos | SHELL | zsh |
join_command_args ¶
get_machine_id ¶
get_machine_id() -> UUID
Get a unique identifier for the current machine that is consistent across reboots and different processes. The following platform-specific methods are given priority:
Platform | Method |
---|---|
linux | The /sys/class/dmi/id/product_uuid , /etc/machine-id or /var/lib/dbus/machine-id files |
windows | The HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\MachineGuid registry key |
macos | The IOPlatformUUID property of the IOPlatformExpertDevice node in the I/O Registry |
As a fallback, the ID will be generated using the MAC address.