mount
system administrationLinux/Unix
The mount command is one of the most frequently used commands in Linux/Unix-like operating systems. mount Mount a filesystem
Quick Reference
Command Name:
mount
Category:
system administration
Platform:
Linux/Unix
Basic Usage:
mount [options] [arguments]
Common Use Cases
Syntax
mount [-t fstype] [-o options] device dir
Options
Option | Description |
---|---|
-a, --all |
Mount all filesystems mentioned in /etc/fstab |
-B, --bind |
Mount a subtree somewhere else (same as -o bind) |
-c, --no-canonicalize |
Don't canonicalize paths |
-f, --fake |
Dry run; skip the mount system call |
-F, --fork |
Fork off for each device (use with -a) |
-i, --internal-only |
Don't call the /sbin/mount.* helpers |
-l, --show-labels |
Show also filesystem labels |
-L, --label LABEL |
Mount partition with the specified label |
-M, --move |
Move a subtree to some other place |
-n, --no-mtab |
Don't write to /etc/mtab |
-o, --options opts |
Mount options specified by a comma-separated string |
-O, --test-opts opts |
Limit the set of filesystems (with -a) |
-r, --read-only |
Mount the filesystem read-only (same as -o ro) |
-R, --rbind |
Mount a subtree and all submounts somewhere else |
-t, --types fstype |
Specify filesystem type(s) |
-U, --uuid UUID |
Mount partition with the specified UUID |
-v, --verbose |
Verbose mode |
-w, --rw, --read-write |
Mount the filesystem read-write (default) |
Common Mount Options:
Option | Description |
---|---|
ro |
Mount read-only |
rw |
Mount read-write |
exec |
Allow execution of binaries |
noexec |
Do not allow execution of binaries |
suid |
Allow set-user-ID or set-group-ID bits |
nosuid |
Disable set-user-ID or set-group-ID bits |
dev |
Interpret character or block special devices |
nodev |
Do not interpret character or block special devices |
user |
Allow ordinary user to mount |
nouser |
Forbid ordinary user to mount |
remount |
Remount an already-mounted filesystem |
sync |
Synchronous I/O |
async |
Asynchronous I/O |
bind |
Bind mount a directory to another location |
loop |
Mount as a loop device |
Examples
How to Use These Examples
The examples below show common ways to use the mount
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
mount /dev/sdb1 /mnt