whatis fsck

fsck

Also known as: filesystem check

The tool that checks a filesystem for inconsistencies and repairs them, typically run on an unmounted partition after a crash.

What Is fsck in Linux?

fsck is a front end that calls the right checker for each filesystem, such as e2fsck for ext4 or xfs_repair for XFS. Systemd runs it automatically at boot for filesystems with a non-zero pass number in fstab.

Never run a repair on a mounted read-write filesystem; boot from a live USB or use rescue mode. Btrfs and ZFS use their own scrub and check tools instead.

Example

sudo umount /dev/sdb1
sudo fsck -f /dev/sdb1