mount – mount a filesystem

mount attaches filesystems to the directory tree, making them accessible. Without arguments, it shows currently mounted filesystems.
Synopsis
mount [OPTIONS] DEVICE MOUNTPOINT
mount [OPTIONS] [-t TYPE] DEVICE MOUNTPOINT
Examples
Show mounted filesystems
$ mount
/dev/sda1 on / type ext4 (rw,relatime)
/dev/sdb1 on /data type xfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev)
Better view with findmnt
$ findmnt
$ findmnt -t ext4,xfs # Only specific types
Mount a partition
$ sudo mount /dev/sdb1 /mnt/data
Mount with filesystem type
$ sudo mount -t ntfs /dev/sdc1 /mnt/usb
$ sudo mount -t vfat /dev/sdc1 /mnt/usb
Mount ISO image
$ sudo mount -o loop disk.iso /mnt/iso
Mount network share (NFS)
$ sudo mount -t nfs server:/share /mnt/nfs
Mount network share (CIFS/SMB)
$ sudo mount -t cifs //server/share /mnt/smb -o username=user
Mount with options
$ sudo mount -o ro /dev/sdb1 /mnt/data # Read-only
$ sudo mount -o rw,noexec /dev/sdb1 /mnt/data # No execute
Common Options
| Option | Description |
|---|---|
-t TYPE | Filesystem type |
-o OPTIONS | Mount options |
-r | Read-only (same as -o ro) |
-a | Mount all in /etc/fstab |
--bind | Bind mount (mount directory to another location) |
Mount Options (-o)
| Option | Description |
|---|---|
ro | Read-only |
rw | Read-write |
noexec | Don’t allow execution |
nosuid | Ignore setuid bits |
nodev | Ignore device files |
loop | Mount file as block device |
uid=N | Set owner UID |
gid=N | Set owner GID |
Persistent Mounts (/etc/fstab)
# /etc/fstab
# <device> <mountpoint> <type> <options> <dump> <pass>
/dev/sdb1 /data ext4 defaults 0 2
UUID=abc123 /backup xfs defaults,noatime 0 2
//server/share /mnt/smb cifs credentials=/etc/samba/creds 0 0
Apply fstab changes:
$ sudo mount -a
Tips
- Use UUID: More reliable than device names (
blkidto find UUIDs) - Check fstab syntax:
mount -atests all entries - Unmount before removing: Always
umountbefore disconnecting drives - Lazy unmount:
umount -lif device is busy
See Also
Related Commands
- umount — Unmount filesystems
- df — Disk space usage
- lsblk — List block devices
- findmnt — Find mounted filesystems






