Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.
System administration command. Mount a file structure. The file structure on device is mounted on directory. If no device is specified, mount looks for an entry in /etc/fstab to find out what device is associated with the given directory. The directory, which must already exist and should be empty, becomes the name of the root of the newly mounted file structure. If mount is invoked with no arguments, it displays the name of each mounted device, the directory on which it is mounted, its filesystem type, and any mount options associated with the device.
Options
-a
Mount all filesystems listed in /etc/fstab. Use -t to limit this to all filesystems of a particular type.
--bindolddirectorynewdirectory
Bind a mounted subtree to a new location. The tree will be available from both the old and new directory. This binding does not include any volumes mounted below the specified directory.
-f
Fake mount. Go through the motions of checking the device and directory, but do not actually mount the filesystem.
-F
When used with -a, fork a new process to mount each system.
-h
Print help message, then exit.
-l
When reporting on mounted filesystems, show filesystem labels for filesystems that have them.
-Llabel
Mount filesystem with the specified label.
--moveolddirectorynewdirectory
Move a mounted device to a new location. Keep in place any options and submounts.
-n
Do not record the mount in /etc/mtab.
-ooption
Qualify the mount with a mount option. Many filesystem types have their own options. The following are common to most filesystems:
async
Read input and output to the device asynchronously.
atime
Update inode access time for each access. This is the default behavior.
auto
Allow mounting with the -a option.
defaults
Use all options' default values (async, auto, dev, exec, nouser, rw, suid).
dev
Interpret any special devices that exist on the filesystem.
dirsync
Perform all directory updates to the filesystem synchronously.
exec
Allow binaries to be executed.
_netdev
Filesystem is a network device requiring network access.
noatime
Do not update inode access time for each access.
noauto
Do not allow mounting via the -a option.
nodev
Do not interpret any special devices that exist on the filesystem.
noexec
Do not allow the execution of binaries on the filesystem.
nosuid
Do not acknowledge any suid or sgid bits.
nouser
Only privileged users will have access to the filesystem.
remount
Expect the filesystem to have already been mounted, and remount it.
ro
Allow read-only access to the filesystem.
rw
Allow read/write access to the filesystem.
suid
Acknowledge suid and sgid bits.
sync
Read input and output to the device synchronously.
user
Allow unprivileged users to mount or unmount the filesystem. The defaults on such a system will be nodev, noexec, and nosuid, unless otherwise specified.
users
Allow any user to mount or unmount the filesystem. The defaults on such a system will be nodev, noexec, and nosuid, unless otherwise specified.
-Ooption
Limit systems mounted with -a by -O's filesystem options (as used with -o). Use a comma-separated list to specify more than one option, and prefix an option with no to exclude filesystems with that option. Options -t and -O are cumulative.
-r
Mount filesystem read-only.
--rbindolddirectorynewdirectory
Bind a mounted subtree to a new location. The tree will be available from both the old and new directory. Include any volumes mounted below the specified directory.
-s
Where possible, ignore mount options specified by -o that are not supported by the filesystem.
-ttype
Specify the filesystem type. Possible values include adfs, affs, autofs, coda, cramfs, devpts, efs, ext2, ext3, hfs, hpfs, iso9660, jfs, minix, msdos, ncpfs, nfs, nfs4, ntfs, proc, qnx4, reiserfs, romfs, smbfs, sysv, tmpfs, udf, ufs, umsdos, vfat, xfs, and xiafs. The default type is iso9660. The type auto may also be used to set mount to autodetect the filesystem. When used with -a, this option can limit the types mounted. Use a comma-separated list to specify more than one type to mount. Prefix a list (or type) with no to exclude those types.
-Uuuid
Mount filesystem with the specified uuid.
-v
Display mount information verbosely.
-V
Print version, then exit.
-w
Mount filesystem read/write. This is the default.
Files
/etc/fstab
List of filesystems to be mounted and options to use when mounting them.
/etc/mtab
List of filesystems currently mounted and the options with which they were mounted.