machineenv 1 user commands nosh
machineenv set the "machine" environment variables from the dynamic values
`machineenv` next-prog

## Description

`machineenv` is a chain-loading utility that sets environment variables and then chain loads to next-prog with the execvp 3 function.

next-prog may contain its own command line options, which `machineenv` will ignore.

The following environment variables are set:

`MACHINEID`

  Set to the human-readable hexadecimal non-punctuated form of the machine ID, for details on which (and some caveats as to mis-use) see machine-id 7.

`HOSTNAME`

  Set to the dynamic "host" name, as initialized by set-dynamic-hostname 1 (for example) and obtained by the gethostname 2 function.

`DOMAINNAME`

  Set to the dynamic "NIS domain" name, as obtained by the getdomainname 2 function.

  This is not the "DNS domain" name, conventionally found in a `LOCALDOMAIN` environment variable.

## Bugs

As of version 1.34 this program no longer employs the GNU C library nor the BSD C library for environment variable handling. The previously documented workaround for those libraries' having memory leaks in their setenv 3 and clearenv 3 functions, is therefore no longer necessary.

## See also

- userenv-fromenv 1

- setenv 1

- envuidgid 1

- clearenv 1

## Author

Jonathan de Boyne Pollard