mount(8)
Name
mount, umount − mount or unmount file systems
Syntax
/etc/mount [ options ] [ device ] [ directory ]
/etc/umount [ options ] [ device ] [ directory ]
Description
This is a general description of the mount command. Additional mount descriptions are provided to define the mount syntax and options for the NFS and UFS file systems.
Each invocation of the mount command announces to the system that a file system is present on the device device. The file system may be local or remote. File directory must exist as a directory file. It becomes the name of the newly mounted file system root.
If invoked without arguments, mount prints the list of mounted file systems.
Physically write-protected disks and magnetic tape file systems must be mounted read-only or an error will occur at mount time.
General users can only mount file systems with certain restrictions. For example, the user, other than the superuser, performing the mount must own the directory directory. Furthermore, no users other than the superuser can execute setuid or setgid programs on the mounted file systems. In addition, users other than the superuser cannot access block or special character devices such as rra0g on the mounted file systems.
The umount command announces to the system that the removable file system previously mounted on the specified directory is to be removed. Only the person who mounted a particular file system or the superuser can unmount the file system again.
Options
−a Reads the file /etc/fstab and mounts, or unmounts, all file systems listed there.
−f Fast unmount. The −f option has no meaning for local file systems and directories. However, for remote file system types (such as NFS), the −f option causes the client to unmount the remotely mounted file systems and directories without notifying the server. This can avoid the delay of waiting for acknowledgment from a server that is down.
−o options Specifies a string that is passed to the kernel and used by the specific file system’s mount routine in the kernel. For specific options, refer to the file system-specific mount description, such as mount(.).
−r Indicates that the file system is to be mounted read only. To share a disk, each host must mount the file system with the −r option.
−t type Specifies the type of file system is being mounted. When used with the −a option, the −t option mounts all file systems of the given type found in the /etc/fstab file. For specific file system types, refer to the file system-specific mount description, such as mount(.).
−v Tells what did or did not happen. (Verbose flag)
The options for umount are:
−a Unmounts all mounted file systems. It may be necessary to execute umount −a twice to accomplish unmounting of all mounted file systems.
−v Tells what did or did not happen. (Verbose flag)
Restrictions
Mounting corrupted file systems will crash the system.
Files
/etc/fstab File systems information table
See Also
getmnt(2), mount(2), fstab(5), fsck(8), mount(8nfs), mount(8ufs)