UTS namespace

UTS namespaces provide isolation of two system identifiers: the hostname and the NIS domain name. These identifiers are set using sethostname and setdomainname, and can be retrieved using uname, gethostname, and getdomainname.

Changes made to these identifiers are visible to all other processes in the same UTS namespace but are not visible to processes in other UTS namespaces.

When a process creates a new UTS namespace using clone or unshare with the CLONE_NEWUTS flag, the hostname and domain of the new UTS namespace are copied from the corresponding values in the caller's UTS namespace.

Hosts have a name and a domain name.

A new UTS namespace allows processes on it to change those names without affecting the names in outer spaces.

  • This is beneficial to “simulate” the execution of applications in arbitrary hosts.

Last updated