LINFO

The /mnt Directory



The /mnt directory and its subdirectories are intended for use as the temporary mount points for mounting storage devices, such as CDROMs, floppy disks and USB (universal serial bus) key drives. /mnt is a standard subdirectory of the root directory on Linux and other Unix-like operating systems, along with directories such as /bin, /boot, /dev, /etc, /home, /proc, /root, /sbin, /usr and /var. As is the case with all other first tier directories in the root directory, /mnt's name always begins with a forward slash.

Mounting is the process of attaching an additional filesystem, which resides on a CDROM, hard disk drive (HDD) or other storage device, to the currently accessible filesystem of a computer. Filesystem in this context refers to the hierarchy of directories (also referred to as the directory tree) that is used to organize files on a computer. On Unix-like operating systems, the directories start with the root directory, which is the directory that contains all other directories and files on the system and which is designated by a forward slash. The currently accessible filesystem is the filesystem that is currently in use in the computer.

The mount point is the directory in the currently accessible filesystem (typically an empty directory) to which the additional filesystem is attached (i.e., mounted). It becomes the root directory of the subtree from the newly added storage device, and that subtree becomes accessible from that directory. Any original contents of the mount point become invisible and inaccessible until the filesystem is unmounted (i.e., detached from the main filesystem).

/mnt can be empty, or it can contain subdirectories for mounting individual devices. Its subdirectories on a typical system include /mnt/cdrom and /mnt/floppy; other subdirectories can be created as desired.

Although /mnt exists specifically for mounting storage devices, other directories can also be used for this purpose. Major filesystems on non-root partitions (i.e., logically independent sections) of the hard disk drive (HDD) are typically mounted in the root directory, but they can likewise be mounted in other directories, including those created by a user for the purpose.






Created February 13, 2006.
Copyright © 2006 The Linux Information Project. All Rights Reserved.