How to Check Disk for Errors Using Command Line in Windows 11
Checking your disk for errors from the command line scans the file system and, optionally, the drive surface for problems, helping resolve corruption and read issues. Windows 11 includes the `chkdsk` tool for this YYGACOR Login maintenance task.
The Command
chkdsk C: /f
What It Does
`chkdsk C: /f` checks the C drive’s file system and fixes errors it finds, with `/f` enabling the fixing. Because the system drive is in use, it typically asks to schedule the check for the next restart. This tool resolves file system corruption that can cause files to become inaccessible or the system to behave unreliably.
When You’d Use This
This is the tool to reach for when files become inaccessible, the file system seems corrupted, or a drive behaves unreliably, since it scans for and repairs file system errors. Adding the bad-sector check is valuable when you suspect physical drive problems. It is a fundamental disk maintenance and repair step for resolving corruption that causes files or the system to misbehave.
Useful Variations
Adding `/r` locates bad sectors and recovers readable information, a more thorough but slower scan: `chkdsk C: /f /r`. To check a different drive, change the letter. Running `chkdsk` without switches checks the drive in read-only mode, reporting problems without fixing them, which is useful for a quick status.
If It Doesn’t Work
Checking the system drive usually requires scheduling the scan for the next restart, since the drive cannot be locked while in use, so confirm and reboot when prompted. The command needs an administrator terminal to make repairs. A thorough `/r` scan on a large drive can take a very long time, so run it when you can leave the computer, and do not interrupt it midway.
Good to Know
Checking the drive Windows is running from usually requires scheduling the scan for the next restart, since the drive cannot be exclusively locked while in use, so you confirm and reboot. The command needs an administrator command line to make repairs. A `/r` scan on a large drive can take considerable time, so allow for it.
Putting It Together
Once you have run it once or twice, this becomes second nature. As part of keeping Windows healthy and automating upkeep, this command is part of the maintenance routine that resolves problems and prevents them. Combined with the related service and repair commands, it gives you direct control over the background machinery that keeps the system running well. Like anything in the terminal, the real value comes from trying it on your own system and adapting the variations above to what you actually need, so it is worth experimenting with in a safe, low-stakes situation before relying on it in a script or during troubleshooting. Keeping a note of the commands you find most useful, along with the variations that fit your workflow, turns scattered one-off tricks into a personal reference you can draw on whenever a similar task comes up again.