$linuxjunkies
>

mount namespace

also: mnt namespace

A Linux namespace that isolates the filesystem mount points visible to a process and its children, allowing different processes to have different views of the filesystem hierarchy.

A mount namespace is a kernel feature that virtualizes the filesystem mountpoint table. Each process exists within a mount namespace that defines which filesystems it can see and where they are mounted. Processes in different mount namespaces can mount and unmount filesystems independently without affecting others.

This isolation is fundamental to containerization technologies like Docker. For example, a container might have its own mount namespace where / points to a container-specific root filesystem, while the host system's / remains unchanged. Processes inside and outside the container see completely different directory structures.

Mount namespaces are created and managed using the unshare command, clone() system call, or container tools. You can inspect a process's mount namespace through /proc/[pid]/mounts to see its specific mountpoint view.

Related terms