Command referencechkdsk
chkdsk command (Windows / CMD)
What it does
Check a volume's filesystem and optionally repair logical or physical errors. Searches for the chkdsk command cmd disk repair usually need CMD syntax, practical switches, and notes on how it compares with PowerShell or Linux alternatives. This page covers syntax, common options, and copyable examples for Command Prompt.
Check a volume's filesystem and optionally repair logical or physical errors.
Syntax
chkdsk [volume[[path]filename]] [/F] [/R] [/X] [/SCAN]
Common options
| Flag / option | Meaning |
|---|---|
| /F | Fix filesystem errors. |
| /R | Locate bad sectors and recover readable data; includes /F. |
| /X | Dismount the volume first if needed. |
| /SCAN | Run an online NTFS scan. |
Practical examples
Read-only check
chkdsk C:
Reports filesystem status without requesting fixes.
Repair volume
chkdsk D: /F
Fixes logical errors on D.
Online scan
chkdsk C: /scan
Scans an NTFS system volume online.
Common mistakes
- Starting `/R` without allowing substantial time for a large disk.
- Forcing a dismount on a volume with active applications.
- Treating filesystem repair as a substitute for backups or failing-drive diagnostics.
Related commands
FAQ
What does chkdsk do in Command Prompt?
Check a volume's filesystem and optionally repair logical or physical errors.
How do I run chkdsk in CMD?
Open Command Prompt and follow `chkdsk [volume[[path]filename]] [/F] [/R] [/X] [/SCAN]`; quote paths containing spaces.
What is a practical chkdsk example in CMD?
Try `chkdsk C:` — Reports filesystem status without requesting fixes.
Can chkdsk be used in a batch file?
Yes. Check its exit code and escape CMD metacharacters when input is variable.
Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.