The UTS namespace isolates two system values: the hostname and the NIS domain name. Processes in an isolated environment can therefore see a machine name that differs from the host’s.
A hostname per namespace
A process can read or change the hostname with tools such as hostname and uname. When a process is created in a new UTS namespace, those operations apply to that process’s isolated view.
Changing the hostname in a child namespace does not change the hostname seen by its parent. The kernel interprets the read or update according to the context in which it runs.

Joining another process’s namespace
Linux also lets an authorised process join another process’s UTS namespace. From then on, hostname queries run in that namespace’s context.
Namespaces as isolation building blocks
The UTS namespace is one small part of an isolated environment. By itself it does not separate processes, networking or storage; containers combine namespaces and other controls to define the isolation an application needs.
This article follows our introduction to PID namespaces.
