understanding "mount" as a concept in the OS

As fschnitt points out, a comprehensive answer to this would likely be a chapter in a systems administration manual, so I'll try just to sketch the basic concepts. Ask new questions if you need more detail on specific points.

In UNIX, all files in the system are organized into a single directory tree structure (as opposed to Windows, where you have a separate directory tree for each drive).

There is a "root" directory, which is denoted by /, which corresponds to the top directory on the main drive/partition (in the Windows world, this would be C:). Any other directory and file in the system can be reached from the root, by walking down sub-directories.

How can you make other drives/partitions visible to the system in such a unique tree structure? You mount them: mounting a drive/partition on a directory (e.g., /media/usb) means that the top directory on that drive/partition becomes visible as the directory being mounted. Example: if I insert a USB stick in Windows I get a new drive, e.g., F:; if in Linux I mount it on directory /media/usb, then the top directory on the USB stick (what I would see by opening the F: drive in Windows) will be visible in Linux as directory /media/usb. In this case, the /media/usb directory is called a "mount point".

Now, drives/partitions/etc. are traditionally called "(block) devices" in the UNIX world, so you always speak of mounting a device on a directory. By abuse of language, you can just say "mount this device" or "unmount that directory".

I think I've only covered your point 1., but this could get you started for more specific questions.

Further reading: * http://ultra.pr.erau.edu/~jaffem/tutorial/file_system_basics.htm


In Unix everything is a file.

These files are organized in a tree structure, beginning at the root /.

Your filesystem or filesystems will then be mounted at the appropriate places in your / according your /etc/fstab file. This file contains information about your filesystems, which device they belong to and to which point they will get mounted to - the mountpoint.

Thats the "mount concept".

It is not limited to disks and other blockdevices, here are some examples involving mount:

  • Mount a representation of your running kernel under /proc
  • Mount a special log partition (other device, "logfriendly" filesystem) under /var/log
  • Install different systems and mount just one home directory
  • Mount remote directories for example via NFS to your system
  • Mount a image of a cd to a specific directory

I found this resource helpful: https://help.ubuntu.com/community/Mount

Data on a computer, as you may know, is stored in binary as a series of 1s and 0s. The way these are stored on a device and their structure is called the "filesystem". In Linux devices are referenced in /dev. Data is not actually stored on a device so you cannot access this data by going into /dev, this is because it is stored inside the filesystem on the device so you need to access these filesystems somehow. Accessing such filesystems is called "mounting" them, and in Linux (like any UNIX system) you can mount filesystems into any directory, that is, make the files stored in that filesystem accessible when you go into a certain directory. These directories are called the "mount points" of a filesystem.