Windows chkdsk equivalent in Linux
Scans and repairs filesystem errors on a disk or partition.
chkdsk
fsck
fsck
fsck
Overview
What this command does
On Windows, "chkdsk" is used to check filesystem integrity. On Linux, the closest practical mapping shown here is "fsck". Scans and repairs filesystem errors on a disk or partition. This reference is grouped under System & Storage → Disk & Storage.
Windows → Linux context
What changes when you use this on Linux?
Equivalent task, different tool
Windows chkdsk maps to fsck for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.
Portable across the compared distros
The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.
Command-specific caution
Running fsck on a mounted filesystem can cause severe data corruption. Always unmount first.
For the broader concept behind this mapping, read Linux disks, storage and mounts.
Practical tasks
Common use cases
Check filesystem integrity
Scans and repairs filesystem errors on a disk or partition.
fsck -n
Dry run — check only, make no changes
fsck -y
Automatically answer yes to all fixes
fsck -v
Verbose output
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
umount /dev/sdb1
fsck /dev/sdb1
fsck -y /dev/sdb1
sudo touch /forcefsck
Walkthrough
Examples with explanations
# Windows: chkdsk C: /f
# First, unmount the drive (REQUIRED):
umount /dev/sdb1
fsck /dev/sdb1 # check the partition
fsck -y /dev/sdb1 # auto-fix all errors
# Check your root partition — needs live USB or:
sudo touch /forcefsck # force check on next reboot
Reference
Common options and variations
| Command or option | Use |
|---|---|
fsck -n | Dry run — check only, make no changes |
fsck -y | Automatically answer yes to all fixes |
fsck -v | Verbose output |
fsck /dev/sdb1 | Check a specific partition |
e2fsck | fsck for ext2/ext3/ext4 filesystems |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
Debian/Ubuntu, Fedora and Arch all use "fsck" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | fsck |
Same command on this distribution. |
| Fedora | same command | fsck |
Same command on this distribution. |
| Arch | same command | fsck |
Same command on this distribution. |
Important
What to watch out for
Keep learning