Skip to content

Linux mount Guide

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Linux mount Guide

Complete beginner-friendly guide to mount on Linux, covering Arch Linux, CachyOS, and other distributions including mounting filesystems, fstab configuration, and device management.


Table of Contents

  1. Understanding mount
  2. Basic Mounting
  3. Mount Options
  4. fstab Configuration
  5. Unmounting
  6. Troubleshooting

Understanding mount

What is mount?

mount attaches filesystems to directory tree.

Uses:

  • Mount disks: Attach storage devices
  • Mount network shares: Access remote filesystems
  • Mount ISO files: Access disk images
  • Temporary mounts: Mount for specific tasks

Why it matters:

  • Access files: Use files on devices
  • Organize storage: Manage multiple disks
  • Network access: Access remote storage

Basic Mounting

List Mounts

View mounted filesystems:

# List all mounts
mount

# List specific device
mount | grep /dev/sdb

# Or use findmnt
findmnt

Mount Device

Basic mount:

# Mount device
sudo mount /dev/sdb1 /mnt

# Mount with filesystem type
sudo mount -t ext4 /dev/sdb1 /mnt

Mount Options

Common Options

Mount with options:

# Read-only
sudo mount -o ro /dev/sdb1 /mnt

# Read-write
sudo mount -o rw /dev/sdb1 /mnt

# No execution
sudo mount -o noexec /dev/sdb1 /mnt

# Multiple options
sudo mount -o rw,noexec,nosuid /dev/sdb1 /mnt

Filesystem Options

Filesystem-specific:

# ext4 options
sudo mount -o defaults,noatime /dev/sdb1 /mnt

# NTFS options
sudo mount -t ntfs-3g -o defaults /dev/sdb1 /mnt

fstab Configuration

Edit fstab

Configure auto-mount:

# Edit fstab
sudo vim /etc/fstab

fstab Format

Entry format:

UUID=xxxx-xxxx  /mnt  ext4  defaults  0  2

Fields:

  1. Device: UUID or device path
  2. Mount point: Directory
  3. Filesystem: Type
  4. Options: Mount options
  5. Dump: Backup flag
  6. Pass: fsck order

Unmounting

Unmount Device

Unmount:

# Unmount
sudo umount /mnt

# Or by device
sudo umount /dev/sdb1

# Force unmount
sudo umount -f /mnt

# Lazy unmount
sudo umount -l /mnt

Troubleshooting

Mount Errors

Check device:

# List devices
lsblk

# Check filesystem
sudo fsck /dev/sdb1

# Check mount point
ls -la /mnt

Device Busy

Fix busy device:

# Check what's using it
lsof /mnt

# Or
fuser -m /mnt

# Force unmount
sudo umount -f /mnt

Summary

This guide covered mount usage, fstab configuration, and filesystem management for Arch Linux, CachyOS, and other distributions.


Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally