To mount a drive in Linux, first create a mount point directory (sudo mkdir /mnt/mydrive), then run sudo mount /dev/sdb1 /mnt/mydrive. To unmount it safely before removing, run sudo umount /mnt/mydrive (note: umount, not unmount). For USB drives and external storage, modern Linux desktops mount them automatically when plugged in. For permanent mounts that survive reboots, add an entry to /etc/fstab.
Linux’s Unified Filesystem and Mounting
On Windows, each storage device gets its own drive letter — your internal drive is C:, your USB stick becomes E:, your external hard drive becomes F:. Every device is a separate, labeled root.
Linux works completely differently. There is one unified filesystem tree starting at / (root), and every storage device, partition, network share, or virtual filesystem is made accessible by mounting it at a specific location within that tree. A USB drive might appear at /media/sarah/USBD, a second hard drive at /mnt/storage, an NFS network share at /nfs/server, and a CD-ROM at /media/cdrom. All are part of the same tree; they just live at different branches.
This design is elegant and powerful. You never need to remember which drive letter a device got. You choose where storage appears in the filesystem. Software can reference paths without caring whether they sit on a local SSD, a network drive, or a USB stick — the location in the filesystem is what matters, not the physical device providing it.
Mounting is the act of making a filesystem accessible at a specific location. Unmounting safely disconnects it. Understanding this process — from the temporary manual mounts you perform for a one-time task, to the permanent entries in /etc/fstab that make drives available on every boot — is fundamental Linux knowledge for anyone who works with more than one storage device.
The Linux Storage Device Naming System
Before mounting anything, you need to know the device’s name — the identifier Linux uses to refer to the physical storage.
Device Files in /dev
Linux represents storage devices as files in the /dev directory:
SATA, USB, and most modern drives:
/dev/sda— first drive (a = first)/dev/sdb— second drive/dev/sdc— third drive- Partitions:
/dev/sda1(first partition),/dev/sda2(second partition), etc.
NVMe SSDs:
/dev/nvme0n1— first NVMe drive (nvme0 = first controller, n1 = first namespace)/dev/nvme0n1p1— first partition/dev/nvme0n1p2— second partition
Virtual disks (in VMs):
/dev/vda,/dev/vdb— virtio block devices
Loop devices (disk image files):
/dev/loop0,/dev/loop1— mounted ISO images, AppImages, Snap packages
Optical drives:
/dev/sr0— first CD/DVD drive
Identifying Storage Devices
Before mounting, identify which device is which:
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 931.5G 0 disk
└─sda1 8:1 0 931.5G 0 part /mnt/storage
sdb 8:16 1 14.9G 0 disk
└─sdb1 8:17 1 14.9G 0 part
nvme0n1 259:0 0 477G 0 disk
├─nvme0n1p1 259:1 0 1.1G 0 part /boot/efi
├─nvme0n1p2 259:2 0 470.9G 0 part /
└─nvme0n1p3 259:3 0 5G 0 part [SWAP]
lsblk shows the device tree with sizes and current mount points. Devices with no entry in MOUNTPOINTS column are not currently mounted.
With filesystem information:
$ lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sdb
└─sdb1 vfat FAT32 MYUSB A1B2-C3D4
nvme0n1
├─nvme0n1p1 vfat FAT32 AAAA-BBBB 1.1G 1% /boot/efi
├─nvme0n1p2 ext4 1.0 aaaa-bbbb-cccc-dddd-eeee 220G 51% /
└─nvme0n1p3 swap 1 ffff-gggg-hhhh-iiii-jjjj [SWAP]
The FSTYPE column shows the filesystem type — crucial for the mount command.
Using fdisk to inspect a drive:
$ sudo fdisk -l /dev/sdb
Disk /dev/sdb: 14.91 GiB, 16008609792 bytes, 31267597 sectors
Disk model: USB Drive
Units: sectors of 1 * 512 = 512 bytes
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 31267596 31265549 14.9G b W95 FAT32
The mount Command: Core Concepts
Basic Mount Syntax
sudo mount [options] device mountpoint
Or using a filesystem type explicitly:
sudo mount -t fstype device mountpoint
Creating a Mount Point
A mount point is just an empty directory. The directory must exist before you mount anything to it:
$ sudo mkdir -p /mnt/usb
$ sudo mkdir -p /mnt/external
$ sudo mkdir -p /mnt/backup
Conventional mount point locations:
/mnt/— traditional location for manual, temporary mounts/media/— typically used by automatic desktop mount systems/run/media/username/— modern automatic mount location on systemd systems
The directory does not need to be empty to serve as a mount point (though its previous contents become inaccessible while something is mounted on it). By convention, always use empty directories as mount points.
Mounting a Partition
$ sudo mount /dev/sdb1 /mnt/usb
Linux auto-detects the filesystem type from the partition’s superblock. If auto-detection fails or you want to be explicit:
$ sudo mount -t ext4 /dev/sda1 /mnt/storage
$ sudo mount -t vfat /dev/sdb1 /mnt/usb
$ sudo mount -t ntfs /dev/sdc1 /mnt/windows
$ sudo mount -t exfat /dev/sdd1 /mnt/exfat_drive
Verifying the Mount
After mounting, verify it worked:
$ lsblk | grep sdb
sdb 8:16 1 14.9G 0 disk
└─sdb1 8:17 1 14.9G 0 part /mnt/usb
$ df -h | grep usb
/dev/sdb1 14G 4.2G 9.8G 30% /mnt/usb
$ ls /mnt/usb
Documents Photos backup.tar.gz
Viewing All Current Mounts
$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
/dev/nvme0n1p2 on / type ext4 (rw,relatime)
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077)
/dev/sdb1 on /mnt/usb type vfat (rw,relatime,fmask=0022,dmask=0022)
Or in a cleaner format:
$ findmnt
TARGET SOURCE FSTYPE OPTIONS
/ /dev/nvme0n1p2 ext4 rw,relatime
├─/sys sysfs sysfs rw,nosuid,nodev,noexec
├─/proc proc proc rw,nosuid,nodev,noexec
├─/boot/efi /dev/nvme0n1p1 vfat rw,relatime
└─/mnt/usb /dev/sdb1 vfat rw,relatime
findmnt produces a tree view that clearly shows the mount hierarchy.
Mount Options: Controlling How Drives Are Mounted
The -o flag passes mount options that control how the filesystem is accessed:
Common Mount Options
$ sudo mount -o ro /dev/sdb1 /mnt/usb # Read-only
$ sudo mount -o rw /dev/sdb1 /mnt/usb # Read-write (default)
$ sudo mount -o noexec /dev/sdb1 /mnt/usb # Prevent executing files
$ sudo mount -o nosuid /dev/sdb1 /mnt/usb # Ignore SetUID bits
$ sudo mount -o noatime /dev/sdb1 /mnt/usb # Don't update access times (faster)
$ sudo mount -o remount,rw /mnt/usb # Remount with different options
Combining options with commas:
$ sudo mount -o ro,noexec,nosuid /dev/sdb1 /mnt/usb
FAT/NTFS Specific Options
Windows filesystems (FAT32, exFAT, NTFS) have no concept of Linux ownership. Mount options control how ownership appears:
$ sudo mount -t vfat -o uid=1000,gid=1000,umask=022 /dev/sdb1 /mnt/usb
uid=1000— all files appear owned by UID 1000 (your user)gid=1000— all files appear owned by GID 1000 (your group)umask=022— sets apparent permissions (022 → files appear as 644, dirs as 755)
For NTFS with write support:
$ sudo mount -t ntfs-3g /dev/sdc1 /mnt/windows
The ntfs-3g driver provides full read-write NTFS support. Install if needed:
$ sudo apt install ntfs-3g
Mounting ISO Images
ISO files (disk images) can be mounted as if they were physical discs using loop devices:
$ sudo mount -o loop ubuntu-24.04.iso /mnt/iso
# or
$ sudo mount -t iso9660 -o loop ubuntu-24.04.iso /mnt/iso
Now you can browse the ISO’s contents at /mnt/iso without burning it to a disc or extracting it.
The umount Command: Safely Disconnecting Drives
Note the spelling: the command is umount, not unmount. This trips up many Linux beginners.
Basic Unmounting
$ sudo umount /mnt/usb # Unmount by mount point (preferred)
$ sudo umount /dev/sdb1 # Unmount by device name (also works)
Why Unmounting Matters
Unmounting is not just a formality. Modern filesystems use write caching — data written to a file may sit in memory (the page cache) for seconds or minutes before being physically written to the storage device. Unmounting flushes all pending writes to the device before disconnecting it.
Physically removing a USB drive without unmounting can cause:
- Data loss or corruption if writes were pending
- A corrupted filesystem requiring repair with
fsck - Partial writes that leave files in an inconsistent state
Always unmount (or use the “safely remove” option in the file manager) before physically disconnecting any removable storage.
When umount Fails: “Device is Busy”
The most common unmount failure:
$ sudo umount /mnt/usb
umount: /mnt/usb: target is busy
This means something — a process or an open shell — is using the mounted filesystem. Common causes:
- A terminal is currently in a directory on the mounted filesystem
- A file on the mounted filesystem is open in an application
- A process has the mount point as its working directory
Finding what is using the mount:
$ lsof +D /mnt/usb
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
bash 2145 sarah cwd DIR 8,17 4096 2 /mnt/usb
lsof +D lists all open files under the specified directory. Here, bash (PID 2145) is using /mnt/usb as its working directory.
Finding and killing blocking processes:
$ fuser -mv /mnt/usb
USER PID ACCESS COMMAND
/mnt/usb: sarah 2145 ..c.. bash
$ fuser -k /mnt/usb # Kill all processes using the mount (use with care)
Lazy unmount (when you need to unmount immediately):
$ sudo umount -l /mnt/usb
The -l (lazy) flag detaches the filesystem from the hierarchy immediately, completing the unmount when all remaining file descriptors are closed. The device is no longer accessible for new access, but existing open files finish gracefully. Useful when you need to unmount without killing processes, but should not be used routinely as a substitute for proper unmounting.
Force unmount (last resort for unresponsive situations):
$ sudo umount -f /mnt/usb
Filesystem Types Linux Supports
Linux can mount an impressive range of filesystem types:
| Filesystem | Type String | Notes |
|---|---|---|
| ext4 | ext4 |
Standard Linux filesystem, default for most distributions |
| ext3 | ext3 |
Older Linux filesystem with journaling |
| ext2 | ext2 |
Basic Linux filesystem, no journaling |
| XFS | xfs |
High-performance, scalable, default on RHEL/Fedora |
| Btrfs | btrfs |
Modern Linux FS with snapshots, checksums, RAID |
| FAT32 | vfat |
Windows/cross-platform, common for USB drives |
| exFAT | exfat |
Modern FAT for large files, common for large USB/SD |
| NTFS | ntfs or ntfs-3g |
Windows filesystem, needs ntfs-3g for full write support |
| ISO 9660 | iso9660 |
CD/DVD disc images |
| tmpfs | tmpfs |
RAM-based temporary filesystem (e.g., /tmp) |
| NFS | nfs or nfs4 |
Network File System (remote servers) |
| CIFS/SMB | cifs |
Windows shares / Samba |
| squashfs | squashfs |
Compressed read-only (Snap packages, live ISOs) |
/etc/fstab: Permanent Mount Configuration
The /etc/fstab file (filesystem table) defines which filesystems are mounted at boot and their options. Any drive or partition you want automatically available every time the system starts should have an entry here.
The fstab Format
Each line in /etc/fstab defines one mount with six fields:
<device> <mountpoint> <fstype> <options> <dump> <pass>
Example /etc/fstab:
# /etc/fstab: static file system information
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=aaaa-bbbb-cccc-dddd / ext4 errors=remount-ro 0 1
UUID=AAAA-BBBB /boot/efi vfat umask=0077 0 1
UUID=ffff-gggg-hhhh-iiii none swap sw 0 0
UUID=1234-5678 /mnt/storage ext4 defaults 0 2
Fields explained:
Field 1: Device specification
- UUID (preferred):
UUID=aaaa-bbbb-cccc-dddd— unique identifier that does not change if you add/remove other drives - Device path (fragile):
/dev/sda1— can change if drive order changes - Label:
LABEL=MyDrive— human-readable label set on the filesystem
Field 2: Mount point — the directory where this filesystem will be mounted.
Field 3: Filesystem type — ext4, vfat, ntfs, etc.
Field 4: Mount options — comma-separated options:
defaults— standard options (rw, suid, dev, exec, auto, nouser, async)noauto— do not mount automatically at boot (mount manually when needed)user— allow non-root users to mount this filesystemro— mount read-onlynofail— do not report an error if the device is not present at boot (important for removable drives)_netdev— this is a network filesystem, wait for network before mounting
Field 5: dump — whether this filesystem should be backed up by the dump utility. Almost always 0 (disabled) on modern systems.
Field 6: pass — the order in which fsck checks filesystems at boot:
0— do not check1— check first (the root filesystem/should be 1)2— check after those with pass 1 (other local filesystems)
Finding a Device’s UUID
$ lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINTS
sda
└─sda1 ext4 1234-5678-90ab-cdef-1234-5678-90ab /mnt/storage
$ sudo blkid /dev/sda1
/dev/sda1: UUID="1234-5678-90ab-cdef-1234-5678-90ab" TYPE="ext4"
$ ls -la /dev/disk/by-uuid/
lrwxrwxrwx 1 root root 10 Feb 18 09:00 1234-5678-90ab-cdef -> ../../sda1
UUIDs are the right way to identify devices in fstab — unlike /dev/sda1, a UUID does not change if you add another drive or change the order drives are detected.
Adding a Drive to fstab
Step 1: Get the UUID:
$ sudo blkid /dev/sda1
/dev/sda1: UUID="1234567890abcdef" TYPE="ext4" PARTUUID="abcdef01"
Step 2: Create the mount point:
$ sudo mkdir -p /mnt/storage
Step 3: Edit fstab:
$ sudo nano /etc/fstab
Add a line:
UUID=1234567890abcdef /mnt/storage ext4 defaults,nofail 0 2
Step 4: Test the new fstab entry without rebooting:
$ sudo mount -a
mount -a mounts all filesystems listed in fstab that are not already mounted. If there are errors in your fstab entry, they appear here without requiring a reboot.
Step 5: Verify:
$ df -h | grep storage
/dev/sda1 916G 50G 820G 6% /mnt/storage
fstab Safety Warning
A mistake in /etc/fstab can prevent your system from booting. Always:
- Make a backup copy:
sudo cp /etc/fstab /etc/fstab.backup - Test with
sudo mount -abefore rebooting - Use UUIDs rather than device paths
- Add
nofailfor non-essential drives so a missing drive does not block boot
Automatic Mounting on Desktop Systems
On desktop Linux, you rarely need to manually mount USB drives and external storage — the system handles it automatically.
How Automatic Mounting Works
When you plug in a USB drive:
- The kernel detects the new hardware and creates device files (
/dev/sdb,/dev/sdb1) udevrules fire, recognizing the new block device- The
udisks2service receives notification and examines the device - The file manager (Nautilus, Dolphin, etc.) or auto-mount daemon mounts the drive at
/media/username/LABELor/run/media/username/LABEL - The file manager opens the drive or shows a notification
Manual Control of Automatic Mounts
Even on desktop systems, you sometimes need direct control:
Mount from command line using udisksctl (no sudo needed for user-accessible devices):
$ udisksctl mount -b /dev/sdb1
Mounted /dev/sdb1 at /run/media/sarah/MYUSB
Unmount using udisksctl:
$ udisksctl unmount -b /dev/sdb1
Unmounted /dev/sdb1.
Power off (safely eject) a drive:
$ udisksctl power-off -b /dev/sdb
udisksctl power-off spins down and powers off the device — the equivalent of the “Safely Remove Hardware” function on Windows. After this, you can physically disconnect the drive.
Mounting Network Filesystems
Linux can also mount remote filesystems, making network shares appear as local directories.
NFS (Network File System)
$ sudo apt install nfs-common
$ sudo mkdir -p /mnt/nfs_share
$ sudo mount -t nfs 192.168.1.10:/shared /mnt/nfs_share
For permanent NFS mounts in fstab:
192.168.1.10:/shared /mnt/nfs_share nfs defaults,_netdev,nofail 0 0
The _netdev option tells the system this requires network connectivity — ensuring it mounts only after the network is up.
CIFS/SMB (Windows Shares / Samba)
$ sudo apt install cifs-utils
$ sudo mkdir -p /mnt/windows_share
$ sudo mount -t cifs //192.168.1.20/SharedFolder /mnt/windows_share \
-o username=winuser,password=winpass,uid=1000,gid=1000
For security, store credentials in a file rather than the command line:
$ sudo nano /etc/samba/credentials
username=winuser
password=winpass
$ sudo chmod 600 /etc/samba/credentials
$ sudo mount -t cifs //192.168.1.20/SharedFolder /mnt/windows_share \
-o credentials=/etc/samba/credentials,uid=1000,gid=1000
Checking and Repairing Filesystems: fsck
fsck (filesystem check) verifies and repairs filesystem integrity. It should only be run on unmounted filesystems:
$ sudo umount /dev/sdb1 # Unmount first
$ sudo fsck /dev/sdb1 # Check the filesystem
fsck from util-linux 2.39.3
e2fsck 1.47.0 (5-Feb-2023)
/dev/sdb1: clean, 1234/4096000 files, 234567/16384000 blocks
$ sudo fsck -y /dev/sdb1 # Auto-fix all errors without prompting
For the root filesystem (which cannot be unmounted while running), force a check on next boot:
$ sudo touch /forcefsck # Legacy method
# Or:
$ sudo tune2fs -C 1 /dev/nvme0n1p2 # Force check after 1 mount
Quick Reference: Mount and Unmount Commands
| Task | Command |
|---|---|
| List block devices | lsblk |
| List with filesystem info | lsblk -f |
| List all mounts | findmnt |
| Check disk usage | df -h |
| Get device UUID | sudo blkid /dev/sdb1 |
| Create mount point | sudo mkdir -p /mnt/point |
| Mount a partition | sudo mount /dev/sdb1 /mnt/point |
| Mount with type | sudo mount -t ext4 /dev/sdb1 /mnt/point |
| Mount read-only | sudo mount -o ro /dev/sdb1 /mnt/point |
| Mount ISO image | sudo mount -o loop image.iso /mnt/iso |
| Mount all fstab entries | sudo mount -a |
| Unmount by mount point | sudo umount /mnt/point |
| Unmount by device | sudo umount /dev/sdb1 |
| Lazy unmount | sudo umount -l /mnt/point |
| Find what’s using a mount | lsof +D /mnt/point |
| Desktop mount (no sudo) | udisksctl mount -b /dev/sdb1 |
| Desktop unmount | udisksctl unmount -b /dev/sdb1 |
| Safely eject drive | udisksctl power-off -b /dev/sdb |
| Check filesystem | sudo fsck /dev/sdb1 |
| Edit persistent mounts | sudo nano /etc/fstab |
Conclusion: Mounting as Filesystem Architecture
The Linux mount system is more than a mechanism for accessing storage — it is the architecture of the entire filesystem. Every directory on your system, from /tmp (a tmpfs in RAM) to /proc (a virtual filesystem exposing kernel data) to /home (your user data, possibly on a separate partition) to /mnt/backup (an external drive), is accessible through the same unified tree because something is mounted there.
Understanding mounting means understanding how Linux’s unified filesystem is assembled from many different sources. It explains why adding a new drive requires more than just plugging it in, why /etc/fstab is such an important configuration file, and why “safely eject” is not just a formality but a genuine data safety operation.
With the mount and umount commands, lsblk and findmnt for inspection, /etc/fstab for permanence, and udisksctl for desktop-friendly access — you have the complete toolkit for managing storage in Linux at every level of complexity.




