Vol. I · No. 46The command line sectionSat, 10 Oct 2026
Linux · disks & space

mount

attach a disk to the tree

mount makes the contents of a filesystem appear under a directory. A disk has no drive letter: it shows up wherever you mount it. Run with no arguments, it lists everything currently mounted.

Device, then directory: mount /dev/sdb1 /mnt — and the files appear under /mnt.

Order
Device, then directory
the directory must exist
Needs root
Yes
for ordinary mounts
At every boot
/etc/fstab
lists the permanent ones
Detach with
umount
no n after the u

At the terminal

Read the session first, then the notes: each numbered line in the output is answered by the note with the same number.

root@netflow — bashutil-linux
# mount /dev/sdb1 /mnt/usb
1# ls /mnt/usb
backup.tar.gz photos resume.pdf
2# mount | grep sdb1
/dev/sdb1 on /mnt/usb type vfat (rw,relatime,fmask=0022,dmask=0022)
3# mount -o remount,ro /mnt/usb
4# mount -a
Illustrative session · names, sizes and dates are examples, and every address is from a documentation or private range
Reading the output

What the numbered lines are telling you

1
The disk’s files, under the directory

mount printed nothing, which means it worked. The contents of the USB stick are now at /mnt/usb.

2
What is mounted, and how

The device, the directory, the filesystem type, and the options: rw means it is writable.

3
Changing options without detaching

remount applies new options to a mounted filesystem. ro makes it read-only.

4
Mount everything in fstab

mount -a attaches every filesystem listed in /etc/fstab. Run it after editing that file, to find a mistake before the next boot does.

Switches

A switch changes how the command behaves. These are the ones used day to day; man mount lists the rest. Single-letter switches can usually be joined, so -l -a may be written -la.

-t TYPE
The filesystem type: ext4, vfat, nfs, cifs.
-o OPTIONS
Mount options, comma-separated: ro, noexec, nosuid, loop.
-a
Mount everything listed in /etc/fstab.
-r
Mount read-only. The same as -o ro.
-v
Verbose: describe what is being done.

Variations worth knowing

The same tool, pointed at a narrower question. These four cover most of what it is reached for day to day.

findmnt

Shows all mounts as a tree — easier to read than plain mount.

sudo mount -o ro /dev/sdb1 /mnt

Mounts read-only, so nothing on the disk can be changed.

sudo mount -t nfs 192.168.1.20:/export /mnt/nfs

Mounts a network share from another machine.

sudo mount -o loop image.iso /mnt/iso

Mounts a disk image file as if it were a disk.

In cybersecurity

Mount options are a security control applied to a whole filesystem.

noexec, nosuid, nodev

Mounting /tmp and removable media with these options stops programs running from them and ignores set-uid bits — closing a common path to root.

Read-only for evidence

A disk under investigation is mounted with -o ro so that looking at it cannot alter timestamps or contents.

Network mounts carry trust

An NFS share is only as safe as its server and the network between. Passwords for CIFS shares belong in a root-only credentials file, not in fstab.

Filed under

Disks & space

Read alongside