A bind mount is a Linux filesystem operation that makes an existing directory or file appear at a second location in the directory tree, so that both paths refer to the same underlying data. Nothing is copied and no new filesystem is created: the kernel simply attaches an already mounted subtree to another mount point, and every change made through one path is immediately visible through the other.
Bind mounts are a basic building block of containers, chroot environments and build sandboxes, and they are the standard way to expose host directories to Docker or Podman workloads. They are created with mount --bind, recorded in fstab with the bind option, and behave like any other entry in the mount table.
How a bind mount works in the kernel
A bind mount works by creating a new mount object that points to an existing dentry inside an already mounted filesystem. The Linux virtual filesystem layer (VFS) keeps a tree of mounts; a normal mount connects a block device or pseudo filesystem to a directory, whereas a bind mount connects a subtree of an existing mount to a directory. The inodes, the page cache and the on-disk structures stay exactly the same.
Because the source and the target share inodes, a file opened through /srv/data/report.txt and through /mnt/view/report.txt has the same inode number, the same permissions and the same contents. The bind mount is therefore not a copy and not a link: it is an additional view of the directory hierarchy that exists only in the mount table, not on disk.
The basic commands are short. mount --bind /srv/data /mnt/view mounts only the top mount at the source, while mount --rbind performs a recursive bind that also carries every submount below the source. The following table summarizes the core operations.
| Command | Effect | Typical use |
|---|---|---|
mount --bind src dst | Binds one mount subtree | Expose a single data directory |
mount --rbind src dst | Binds the subtree and all submounts | Populate a chroot with /dev or /proc |
mount -o remount,bind,ro dst | Makes the bind read-only | Protect data from a sandboxed process |
umount dst | Removes only the second view | Tear down a temporary view |
findmnt dst | Shows the source and options | Verify what is actually mounted |
Mount options and propagation types
A bind mount has its own per-mount flags, independent of the source mount. Flags such as ro, nosuid, nodev and noexec can differ between the two views, which allows an administrator to export a directory read-only in one place and writable in another. A long-standing pitfall is that mount --bind -o ro historically ignored the read-only flag on the first call; on older util-linux versions a separate remount step was required, and verifying the result with findmnt remains good practice.
Mount propagation decides whether new mounts created under one view also appear under the other. It was introduced with shared subtrees in kernel 2.6.15 and matters greatly for containers, because systemd marks the root filesystem as shared by default. The four propagation types are compared below.
| Propagation type | Events received | Events sent | Common use |
|---|---|---|---|
| shared | Yes, from peers | Yes, to peers | Default root on systemd hosts |
| slave | Yes, from master | No | Containers that must see host mounts |
| private | No | No | Isolated sandboxes |
| unbindable | No | No | Prevent recursive bind loops |
Propagation is set with flags such as --make-private, --make-rslave or --make-shared, and Docker exposes the same choices as rprivate, rslave and rshared. Choosing the wrong mode can make a USB mount disappear inside a container or, conversely, leak container mounts back to the host.
Bind mount compared with links and overlays
A bind mount differs from a symbolic link, a hard link and OverlayFS in where the redirection lives and what it can cross. A symbolic link is a file containing a path; a hard link is an extra directory entry for the same inode; a bind mount is an entry in the kernel mount table. Each tool solves a different problem.
| Mechanism | Stored where | Crosses filesystems | Works inside chroot | Survives reboot |
|---|---|---|---|---|
| Bind mount | Mount table in memory | Yes | Yes | Only via fstab or unit |
| Symbolic link | On disk as a path | Yes | Only if the path resolves | Yes |
| Hard link | On disk as a directory entry | No | Yes | Yes |
| OverlayFS | Mount table with layers | Yes | Yes | Only via fstab or unit |
The decisive difference appears inside a chroot or container: a symbolic link pointing to /srv/data resolves against the new root and usually breaks, whereas a bind mount is resolved by the kernel before the root changes. Unlike OverlayFS, a bind mount has no copy-up layer, so every write lands directly in the source directory.
Practical use and persistent configuration
Bind mounts are made persistent through fstab or systemd mount units; a mount made on the command line disappears at reboot. A typical fstab line reads /srv/data /var/www/data none bind 0 0, where the filesystem type is none and the option is bind or rbind. On systemd hosts the line is converted into a generated .mount unit, so ordering dependencies such as RequiresMountsFor= work as expected.
The following decision table maps common administrative situations to a recommended bind mount pattern.
| Situation | Recommended pattern | Reason |
|---|---|---|
| Web server needs data from another volume | Bind in fstab, read-only | Keeps paths stable without copying |
| Repairing a system from rescue media | Recursive bind of /dev, /proc, /sys | Tools inside the chroot need kernel interfaces |
| Container needs a host directory | Bind with rprivate propagation | Avoids mount leakage |
| Hide a directory from users | Bind an empty directory over it | Masks contents without deleting them |
| Build sandbox with read-only system | Bind root read-only, tmpfs for work | Prevents writes to the host |
Tools such as bubblewrap, systemd-nspawn and the BindPaths= and BindReadOnlyPaths= service options all rely on the same kernel mechanism, which makes the bind mount a standard technique for hardening individual services.
Limitations and common mistakes
Bind mounts are simple, but several behaviors regularly surprise administrators. Backup and search tools may traverse the same data twice, and disk usage reports can double-count directories unless options such as --one-file-system or -xdev are used.
| Symptom | Cause | Fix |
|---|---|---|
| Bind is writable despite ro | Read-only flag not applied on first call | Remount with remount,bind,ro |
| Submounts missing in target | Plain bind instead of recursive bind | Use rbind |
| umount reports target is busy | A process has its working directory there | Find it with fuser or lsof |
| Mount loop or exploding mount table | Recursive bind of a shared parent into itself | Make the source private or unbindable |
| Container sees wrong ownership | User namespace ID mapping | Use idmapped mounts or adjust ownership |
- A bind mount does not change permissions; the source mode bits and ACLs still apply.
- Deleting files through the target deletes the original data, because there is only one copy.
- A bind of a single file fails if the file is replaced by a rename, since the mount keeps the old inode pinned.
Stripped to the essentials
A bind mount is like adding a second door to the same room. The room and everything in it stay where they are, but people can now walk in through another hallway. Whatever someone moves or removes through one door is changed for everyone, because there is only one room.
Computers use this trick to show a folder in a new place without copying it. It is quick, uses no extra space and disappears when the computer restarts unless it is written into the startup settings.
Where it is applied
A hosting administrator runs a small Linux server where customer uploads live on a separate 2 TB disk mounted at /srv/uploads, while the web application expects them under /var/www/shop/public/media. Instead of moving data or editing the application, the administrator adds one fstab line that binds /srv/uploads to the media directory, and a second remount line makes a separate view under /var/www/preview/media read-only for the staging site.
Later, the server fails to boot after a kernel update. Booted from rescue media, the administrator mounts the root partition at /mnt, performs a recursive bind of /dev, /proc and /sys, enters the system with chroot and reinstalls the bootloader. The repair takes about fifteen minutes, no files are copied, and the shop keeps serving the same uploads from a single location.