Fair enough. It’s easy for us computer geeks to take things for granted that we shouldn’t.
CHKDSK is a command line tool that checks disks.
I’ll talk about what I mean by command line, and what it means to check a disk.
I’ll also show you how to run CHKDSK step by step.
Become a Patron of Ask Leo! and go ad-free!
Checking a disk
Files on your hard disk live in folders; folders can live in other folders; the whole mess lives in your disk, which might actually be a partition on a larger hard disk. On top of that, there may be security information about who is allowed to access what and in what ways they’re allowed to access it.
As you can imagine, things get pretty confusing. All you probably care about is that you get what you expect when you access a file.
There’s a lot of information on the hard disk to help keep track of all of the data being stored there. CHKDSK’s primary job is to make sure all of the administrative information about the files, folders, and other stuff stored on the disk is correct.
Normally, all of that information is correct. The system is designed to keep it correct from startup to shutdown.
Unfortunately, a variety of errors can cause it to be incorrect — things like not shutting down your computer properly, removing USB devices without using Safely Remove, malware, or just flat out hardware errors can cause problems in the administrative information on the hard disk.
CHKDSK’s job is to try to repair those errors.
What’s a ‘command line’ tool?
Most programs in Windows appear as … well, as (or in) a window.
Command line tools do not. They don’t know about on-screen windows and don’t display their results in them. They rely on the Windows “Command Prompt”, which is nothing more than a non-windowed environment that mimics the days before Windows, when all programs were “command line” tools under MS-DOS.
To run CHKDSK, we start with a Command Prompt.
You’ll find Command Prompt in your Start menu. In Windows 10, right-click the Start menu, and it should be listed right there. You’ll want the “(Admin)” version so it runs with full administrative privileges.
You may instead see “Windows PowerShell” instead of Command Prompt. PowerShell will do for our purposes. Once again, be sure to run the “(Admin)” version.
In prior versions of Windows, you’ll find Command Prompt under All Programs – Accessories, or by searching for “Command”. Make sure to right-click on the entry and select “Run as Administrator”.
Running Command Prompt will open a new window that looks like this:
Command line tools are run by typing the command and pressing the Return or Enter key. Any output the tool generates shows up in the window below your typing.
Try it now: after opening a Command Prompt window or clicking it to make it active, type CHKDSK followed by the Enter key.
If you see something like this:
C:\WINDOWS\system32>CHKDSK Access Denied as you do not have sufficient privileges. You have to invoke this utility running in elevated mode.
you’ve not run Windows Command Prompt as administrator. Close Command Prompt (either by clicking the “x” in the upper-right of the Window, or typing “exit” followed by the Enter key), and start it again, this time being sure to select the “(Admin)” version listed, or right-clicking on the Command Prompt menu item and selecting “Run as administrator”.
Without any parameters (I’ll describe a few in a moment), CHKDSK does nothing more than check the disk. It won’t try to fix anything; it’ll simply report any problems it finds.
After displaying a fair amount of technical information about its progress, CHKDSK will finish with a report similar to this:
Windows has scanned the file system and found no problems. No further action is required. 132860751 KB total disk space. 20781384 KB in 129757 files. 116860 KB in 45988 indexes. 0 KB in bad sectors. 575159 KB in use by the system. 65536 KB occupied by the log file. 111387348 KB available on disk. 4096 bytes in each allocation unit. 33215187 total allocation units on disk. 27846837 allocation units available on disk.
That first line is good news. If you want to see what (if anything) precedes that, you can use the scroll bar to the right in the Command Prompt window.
By default, CHKDSK operates on the “current” disk, which in almost all cases would be C:. To have CHKDSK check a different drive, simply follow the CHKDSK command with a space and then the drive designator.
Would check your D: drive.
To have CHKDSK fix any problems it finds, you’d include the “/F” (Fix) parameter:
CHKDSK D: /F
This would check the D: drive, and if any errors were found, CHKDSK would attempt to repair them. The results would be included in the on-screen output.
Finally, the next most common action for CHKDSK is to actually check for bad sectors. That’s the “/R” (Repair) option:
CHKDSK D: /R
When running /R, CHKDSK checks the entire disk surface for bad sectors and attempts once again to repair or work around any that it finds, if it can. Running /R accomplishes /F as well.
The special case of C:
C: is special. (More correctly, your system drive is special, but in most cases, that’s C:.) The problem is that your system is using C:, and CHKDSK can’t repair things that are in use. Run CHKDSK /F on drive C: and you’re likely to see this:
Answer Y for Yes and then reboot your system. CHKDSK will run before Windows starts so it can repair the drive before Windows starts using it.
The most common ways to use CHKDSK are:
- CHKDSK /F – to check and fix the current drive (a reboot might be required)
- CHKDSK D: /F – to check and fix a specific drive (in this case, D:)
- CHKDSK D: /R – to check, fix, and look for bad sectors on a specific drive
You can also run CHKDSK /? to get a list of additional options.