Mount (Unix)

In computing,   is a command in various operating systems. Before a user can access a file on a Unix-like machine, the file system on the device which contains the file needs to be mounted with the mount command. Frequently   is used for SD card, USB storage, DVD and other removable storage devices. The command is also available in the EFI shell.

Overview
The   command instructs the operating system that a file system is ready to use, and associates it with a particular point in the overall file system hierarchy (its mount point) and sets options relating to its access. Mounting makes file systems, files, directories, devices and special files available for use and available to the user. Its counterpart   instructs the operating system that the file system should be disassociated from its mount point, making it no longer accessible and may be removed from the computer. It is important to   a device before removing it since changes to files may have only partially been written and are completed as part of the  .

The   and   commands require root user privilege to effect changes. Alternately, specific privileges to perform the corresponding action may have been previously granted by the root user. A file system can be defined as user mountable in the  file by the root user.

Examples
To display all mounted partitions:

To mount the second partition of a hard disk drive to the existing directory /media/PHOTOS (mount point): To unmount by referring to the physical disk partition: To unmount by referring to the mount point:

To remount a partition with specific options:

Bind mounting
Bind mounting allows a filesystem hierarchy or a file to be mounted at a different mount point. Unlike a symbolic link, a bind mount does not exist on the filesystem itself. In the following example, the path  will be mounted in

Mounting loop devices
A loop device is a device that corresponds to a file, usually a disk image. Mounting a loop device allows the file to be accessed as a filesystem. This allows it to be used as a virtual drive.

For example, a virtual disk image can be mounted as a regular filesystem.

Derivatives and wrappers
is a wrapper around the standard mount program which permits normal users to mount removable devices without a matching /etc/fstab entry. This provides a robust basis for automounting frameworks like GNOME's Utopia project and keeps the usage of root to a minimum.

This package also contains a wrapper pmount-hal, which reads information such as device labels and mount options from HAL and passes it to pmount.

The  package contains programs for mounting, unmounting and ejecting storage devices. The goal for gnome-mount is for GNOME software such as gnome-volume-manager and GNOME-VFS to use this instead of invoking mount/umount/eject/pmount or direct HAL invoking methods. GNOME previously used pmount. Note, gnome-mount is not intended for direct use by users.

All the gnome-mount programs utilize HAL methods and as such run unprivileged. The rationale for gnome-mount is to have a centralized place (in GConf) where settings such as mount options and mount locations are maintained.

As with all unix-like commands, the options are specific to the version of mount and are precisely detailed in its man page.

In addition to the system call mount, the function mount_root mounts the first, or root filesystem. In this context mount is called by the system call setup.