> For the complete documentation index, see [llms.txt](https://davidjosearaujo.gitbook.io/notes-mcs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://davidjosearaujo.gitbook.io/notes-mcs/secure-execution-environments/linux-kernel-namespaces/uts-namespace.md).

# 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.
