overlayfs
also: overlay, overlayfs
A union filesystem that layers a read-write filesystem over one or more read-only filesystems, combining them into a single view where writes go to the top layer.
overlayfs is a Linux kernel filesystem that merges multiple directory trees into a single mount point. It uses three layers: a lower (read-only) layer, an upper (read-write) layer, and a work directory for atomic operations. Files appear unified to the user, but changes only affect the upper layer.
When you read a file, overlayfs looks in the upper layer first; if not found, it searches the lower layer. When you write or modify a file, the change goes only to the upper layer, leaving the lower layer untouched. Deleting a file in the merged view is handled via a special "whiteout" marker in the upper layer.
A practical example is Docker containers: the base image layers are read-only (lower), and each container gets a thin read-write layer (upper) on top. This allows many containers to share the same image while keeping their changes isolated and efficient.