Skip to content

Linux fsck Guide

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Linux fsck Guide

Complete beginner-friendly guide to fsck on Linux, covering Arch Linux, CachyOS, and other distributions including filesystem checking, filesystem repair, and disk maintenance.


Table of Contents

  1. Understanding fsck
  2. fsck Basics
  3. Checking Filesystems
  4. Repairing Filesystems
  5. Troubleshooting

Understanding fsck

What is fsck?

fsck (filesystem check) checks and repairs filesystems.

Uses:

  • Check filesystem: Verify filesystem integrity
  • Repair filesystem: Fix filesystem errors
  • Disk maintenance: Maintain disk health
  • Error recovery: Recover from errors

Why it matters:

  • Filesystem health: Maintain filesystem
  • Error recovery: Fix filesystem errors
  • Data integrity: Ensure data integrity

fsck Basics

Check Filesystem

Basic usage:

# Check filesystem
sudo fsck /dev/sda1

# Checks filesystem integrity

Auto Repair

Automatic repair:

# Auto repair
sudo fsck -a /dev/sda1

# -a = automatic (repairs automatically)

Checking Filesystems

Dry Run

Check only:

# Check only (no repair)
sudo fsck -n /dev/sda1

# -n = no (no repair, check only)

Verbose Mode

Show details:

# Verbose mode
sudo fsck -v /dev/sda1

# -v = verbose (shows details)

Repairing Filesystems

Force Check

Force check:

# Force check
sudo fsck -f /dev/sda1

# -f = force (checks even if clean)

Interactive Repair

Interactive mode:

# Interactive repair
sudo fsck /dev/sda1

# Asks before repairing

Troubleshooting

Unmount First

Unmount device:

# Unmount before checking
sudo umount /dev/sda1

# Then check
sudo fsck /dev/sda1

Summary

This guide covered fsck usage, filesystem checking, and repair 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