Skip to content

mount command

Attach file systems and disks to a directory.

On this page

Syntax

mount [options] device directoryumount directory

Provided by the util-linux package. Run man mount for the full manual.

Common options

OptionWhat it does
-t TYPEFile system type, e.g. ext4, nfs
-o OPTIONSOptions, e.g. ro, noexec
-aMount everything in /etc/fstab
-o remount,rwRemount read-write
-o loopMount a disk image file

Examples

  1. Mount a partition

    sudo mount /dev/sdb1 /mnt/data
  2. Mount read-only

    sudo mount -o ro /dev/sdb1 /mnt
  3. Mount an ISO file

    sudo mount -o loop ubuntu.iso /mnt/iso
  4. Mount an NFS share

    sudo mount -t nfs 192.0.2.5:/exports/data /mnt/nfs
  5. Test /etc/fstab entries

    sudo mount -a
  6. Unmount

    sudo umount /mnt/data
  7. Show mounted file systems

    findmnt

mount guides

← All Linux commands · Suggest a fix

Back to top