{
  "slug": "mount-namespace",
  "term": "Mount namespace",
  "aliases": [
    "Linux mount namespace"
  ],
  "definition": "A Linux mount namespace gives its member processes a particular view of the mount hierarchy.",
  "note": "Creating a namespace with CLONE_NEWNS copies the existing mount list, not the underlying file contents. Processes in different namespaces can therefore still reach the same filesystem data. [namespaces] [shared]\n\nPropagation is a separate property of each mount. Shared mounts propagate mount and unmount events immediately beneath them among peers, potentially across namespaces; private mounts do not propagate those events. A separate namespace alone does not establish a private tree or a storage snapshot. [shared]\n\n/proc/PID/mountinfo describes the target process's mount namespace, including mount roots, propagation fields and separate per-mount and per-superblock options. Inspecting the observer's own list can miss the target's view. [mountinfo]\n\nCommand defaults differ from the system call. The util-linux unshare command makes propagation recursively private for a new mount namespace by default (since 2.27). --propagation unchanged disables that extra step. Record the entry point and options when interpreting namespace isolation. [unshare-manual]",
  "related": [
    "bind-mount",
    "read-only-mount",
    "mount-propagation"
  ],
  "citations": [
    {
      "id": "namespaces",
      "title": "Linux man-pages: mount_namespaces(7), namespace creation and mount-list scope",
      "url": "https://man7.org/linux/man-pages/man7/mount_namespaces.7.html",
      "accessed": "2026-11-04"
    },
    {
      "id": "shared",
      "title": "Linux kernel documentation: Shared Subtrees, propagation and namespace copies",
      "url": "https://docs.kernel.org/filesystems/sharedsubtree.html",
      "accessed": "2026-11-04"
    },
    {
      "id": "mountinfo",
      "title": "Linux man-pages: proc_pid_mountinfo(5), per-process view and option layers",
      "url": "https://man7.org/linux/man-pages/man5/proc_pid_mountinfo.5.html",
      "accessed": "2026-11-04"
    },
    {
      "id": "unshare-manual",
      "title": "util-linux v2.41.1: unshare(1), mount namespace defaults and propagation option",
      "url": "https://kernel.googlesource.com/pub/scm/utils/util-linux/util-linux/+/refs/tags/v2.41.1/sys-utils/unshare.1.adoc",
      "accessed": "2026-11-04"
    }
  ],
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-04",
  "provenance": [
    "Documentation synthesis; no namespace creation, privileged mounting or recovery experiment was performed. Rolling documentation was checked on the access date."
  ]
}
