Mounting and Unmounting

File systems may physically exist in many forms, such as data stored on a disk in a particular file system format, as data generated on-the-fly by the operating system, as data stored only in volatile memory (RAM), as data stored remotely over a network, and so on. In order to interact with a particular file system, an operating system has hardware-and-file system specific driver code which interacts directly with hardware on one end, and provides a uniform, abstract interface for accessing that particular file system on the other end.

Each physical file system has a “root” directory, from which all other files and directories within that file system can be accessed. To create a logical (virtual) file system, the operating system combines multiple physical file systems into a single hierarchical tree structure. Each physical file system’s root directory is bound to a specific path within that tree, known as its mount point.

The file system that contains the core components of the operating system is mounted at a special path called the root directory, which is represented by a forward slash (/). This is the starting point for navigating the logical file system hierarchy, and all other files and directories are located somewhere beneath it. Additional file systems can be mounted to other paths within this logical file system, appearing as virtual subdirectories within the existing structure.

For example, user data is usually stored in a separate physical file system from the system data, and is mounted to a path called /home/. This allows user data to be easily separated from system data, making it easier to manage these files. It also makes user data portable; if a user installs a different operating system on their computer, they can simply mount the existing user data file system on the appropriate mount point in the new system and have seamless access to their files and settings.

Mounting file systems at specific paths allows the operating system to create a unified and organized file system hierarchy that provides easy access to data, while also maintaining the flexibility of multiple discrete file systems to separately maintain that data.