fsck — Linux File System Check Tool

fsck is used to check Linux filesystems. It can also repair problems, but repair operations should be done carefully and only when the filesystem is not mounted for normal use.

Safety note

Do not run filesystem checks against the wrong device. Do not run repair operations on a mounted writable filesystem. For serious filesystem issues, use rescue mode or recovery media and make sure important data is backed up.

Identify the device first

lsblk

This helps you confirm the correct disk and partition before checking anything.

Check a partition

fsck /dev/sdXN

Replace /dev/sdXN with the actual partition name after verifying it. Treat this as an administrative recovery command, not a routine daily command.

Leave a Comment