proc_pid_mountinfo(5)

๐ŸŒธ NAME ๐ŸŒธ

/proc/pid/mountinfo โ€” mount information, bestie ๐Ÿ’– (it lives in the File Formats Manual as proc_pid_mountinfo(5), iykyk)


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

/proc/pid/mountinfo (since Linux 2.6.26) ๐Ÿ’…

okay so this file? iconic. It contains information about mounts in the process's mount namespace (go peep mount_namespaces(7) for the lore on that one). It supplies various information โ€” like, say, propagation state, root of mount for bind mounts, an identifier for each mount and its parent โ€” that is straight-up missing from the (older) /proc/pid/mounts file, and it also fixes various other problems with that file (e.g., nonextensibility, failure to distinguish per-mount versus per-superblock options). the glow-up was real ๐ŸŒˆ

The file contains lines of the form:

36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
(1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)

The numbers in parentheses are labels for the descriptions below, so let's get into it ๐Ÿ‘‡

  • (1) mount ID โ€” a unique ID for the mount (may be reused after umount(2)).
  • (2) parent ID โ€” the ID of the parent mount (or of self for the root of this mount namespace's mount tree).

If a new mount is stacked on top of a previous existing mount (so that it hides the existing mount) at pathname P, then the parent of the new mount is the previous mount at that location. Thus, when looking at all the mounts stacked at a particular location, the top-most mount is the one that is not the parent of any other mount at the same location. (Note, however, that this top-most mount will be accessible only if the longest path subprefix of P that is a mount point is not itself hidden by a stacked mount.)

If the parent mount lies outside the process's root directory (see chroot(2)), the ID shown here won't have a corresponding record in mountinfo whose mount ID (field 1) matches this parent mount ID (because mounts that lie outside the process's root directory are not shown in mountinfo). As a special case of this point, the process's root mount may have a parent mount (for the initramfs filesystem) that lies outside the process's root directory, and an entry for that mount will not appear in mountinfo. wild, but that's the deal ๐Ÿ™ˆ

  • (3) major:minor โ€” the value of st_dev for files on this filesystem (see stat(2)).
  • (4) root โ€” the pathname of the directory in the filesystem which forms the root of this mount.
  • (5) mount point โ€” the pathname of the mount point relative to the process's root directory.
  • (6) mount options โ€” per-mount options (see mount(2)).
  • (7) optional fields โ€” zero or more fields of the form "tag[:value]"; see below.
  • (8) separator โ€” the end of the optional fields is marked by a single hyphen.
  • (9) filesystem type โ€” the filesystem type in the form "type[.subtype]".
  • (10) mount source โ€” filesystem-specific information or "none".
  • (11) super options โ€” per-superblock options (see mount(2)).

Currently, the possible optional fields are shared, master, propagate_from, and unbindable. See mount_namespaces(7) for a description of these fields. Parsers should ignore all unrecognized optional fields โ€” like, do not panic, do not invent meaning, just skip them, fr fr ๐Ÿซถ

For more information on mount propagation see Documentation/filesystems/sharedsubtree.rst in the Linux kernel source tree.


โœจ SEE ALSO โœจ


and that's the whole vibe check, bestie ๐ŸŽ€ this lil love letter is from Linux man-pages 6.20, dated 2026-02-08 โ€” slay, go read your mounts ๐Ÿ‘‘๐Ÿ’œ

๐Ÿ“ฆ where this page comes from
  • arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • ๐Ÿ“œ the page's license: GPL-3.0-or-later
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms