Back to the command reference

mount

DisksFundamentals In real Linux

Mount a file system

Name: mount

This command needs a real Linux system; you can practise it in real Linux mode.

Full man page

Description

mount attaches the file system on a device (partition, USB stick, ISO image, network share) to a directory, the mount point; that directory then shows the device's contents. Without arguments it lists everything mounted.

File systems mounted at boot are configured in /etc/fstab.

Syntax

mount [OPTION]... [DEVICE DIR]

Common options

-t / --types TYPEFile system type, e.g. ext4, vfat
-o / --options OPTIONSOptions, e.g. ro (read-only)
-r / --read-onlyMount read-only (as -o ro)
--bindMount a directory at a second place (both paths show the same files)
-a / --allMount everything in /etc/fstab
-v / --verboseShow what it does

Examples

  • $ mount | column -t

    Show mounted file systems

    Explain
  • $ sudo mount /dev/sda1 /mnt

    Mount the practice disk’s first partition on /mnt (fdisk and mkfs it first)

    Explain
  • $ sudo mount -o remount,ro /mnt

    Make a mounted file system read-only

    Explain

Related