Helping people with computers... one answer at a time.

CHKDSK, short for Check Disk, is a utility that checks the integrity of the files and file structure of your hard disk. I'll walk you through it.

I have disk problems and you said I should run CHKDSK. Great. What is that?

Fair enough. It's easy for us computer geeks to take things for granted that we simply shouldn't.

CHKDSK is a command line tool that checks disks.

I'll talk about what I mean by command line and even what it means to check a disk.

I'll also show you how to run CHKDSK step by step.

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 that you probably care about is that you get what you expect when you access a file.

The fact is that there's a lot of information on the hard disk that helps keep track of all of the data that's being stored there. CHKDSK's primary job is to make sure that all of that administrative information about the files, folders, and other stuff that's 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 errors in the administrative information on the hard disk.

CHKDSK's job is to try and 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 where all programs were "command line" tools under MS-DOS.

And it's with a Command Prompt that we'll start.

Running CHKDSK

You'll find Command Prompt in your Start menu, under All Programs - Accessories.

Windows Command Prompt menu item

Click that and you'll get a new window that looks much like this:

Windows Command Prompt

Command line tools are run by typing in the command with any options and pressing the Return key. Any output that the tool then generates shows up in the window underneath what you've typed.

Try it now: after opening a Command Prompt window or clicking it to make it active, just type CHKDSK followed by the Enter key. You should see something similar to this:

C:\Users\LeoN>CHKDSK
Access Denied as you do not have sufficient privileges.
You have to invoke this utility running in elevated mode.

C:\Users\LeoN>

Our first problem: CHKDSK requires that you not only be administrator, but that you run the program as administrator. The two are not the same.

Type EXIT followed by Enter to close this Command Prompt. We need a new one.

Running CHKDSK as administrator

Head back to Start, All Programs, Accessories, and this time, right-click Command Prompt:

Windows Command Prompt link, right-clicked

This time, click Run as administrator. You may get prompted to confirm.

Windows UAC Prompt

After clicking OK, you'll get a Command Prompt window that's very similar to the one that you had before; except that now, not only does the window have full administrative privileges, but any program that runs within it inherits that permission.

Try that CHKDSK again.

Without any parameters (I'll describe a few in a moment), CHKDSK does nothing more than check. It won't attempt to fix anything; it'll simply report whether it finds any problems.

After displaying a fair amount of technical information about its progress, CHKDSK will finish with a report similar to this:

Windows has checked the file system and found no problems.

  33449983 KB total disk space.
  13811900 KB in 46164 files.
     34088 KB in 12870 indexes.
         0 KB in bad sectors.
    255651 KB in use by the system.
     65536 KB occupied by the log file.
  19348344 KB available on disk.

      4096 bytes in each allocation unit.
   8362495 total allocation units on disk.
   4837086 allocation units available on disk.

That first line is good news. If you want to see what precedes that, you can use the scroll bar to the right in the Command Prompt window.

CHKDSK parameters

By default, CHKDSK operates on the "current" disk, which in almost all of the cases that we're seeing here would be C:. To have CHKDSK check a different drive, simply follow the CHKDSK command with a space, and then the drive designator:

CHKDSK D:

Would check your D: drive.

To actually have CHKDSK fix any problems that it finds, you'd include the "/F" (Fix) parameter:

CHKDSK D: /F

This would check the D: drive; 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 will check the entire disk surface for bad sectors and attempt once again to repair or work around any that it finds, if it can. Running /R also does /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 while they're in use. Run CHKDSK /F and you're likely to see this:

The type of the file system is NTFS.
Cannot lock current drive.

Chkdsk cannot run because the volume is in use by another
process.  Would you like to schedule this volume to be
checked the next time the system restarts? (Y/N)

The step to take is to answer with Yes and then reboot your system. CHKDSK will run before Windows starts so that it can repair the drive before Windows starts using it.

Most common usage

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

  • CHKDSK D: /R - to check and fix and look for bad sectors on a specific drive

You can also run CHKDSK /? to get a list of additional options.

Article C4823 - May 18, 2011

Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

Recent Comments
18 Comments

This GUI can complement CHKDSK https://sites.google.com/a/obxcompguy.com/foolish-it/vb6-projects/checkdisk

Posted by: Nob at June 2, 2011 3:20 PM

Thank you for this wonderfully clear and thorough explanation of a very useful process.

Posted by: Angus Fraser at June 16, 2011 2:59 AM

Sorry I was away . I followed your instructions on CHKDSK. Worked as a charm. Thanks. Regards

Posted by: Farooq at July 12, 2011 10:23 PM

Yours was the best explanation anywhere online of what CHKDSK is and how to use it, in my opinion. Congratulations!

Two suggestions:

1. If CHKDSK: /F and CHKDSK: /R both fix problems, but the latter fixes more, why shouldn't we always opt for CHKDSK: /R in every case? Tell us the difference in your article.

2. What is the difference between CHKDSK: /F and CHKDSK C: /F? You used D as an example, but not C.


1) "/R" takes longer, as is scans the surface media whether it's in use or not. /F only scans for filesystem inconsistancies and thus only needs to check files.

2) If C: is your system drive running it on C: will not run immediately but rather prompt you for permission to run automatically the next time you boot before Windows is fully loaded. Not specifying a drive runs it on the current drive.
Leo
01-May-2012

Posted by: ErikJon at May 1, 2012 12:15 PM

I just found out on another site, that CHKDSK: /R sometimes takes many hours to accomplish. I had already typed in the command line, however. How can I undo the command, so that I can rather do the check tonight when I go to bed, so that it will not interrupt my work by day?

CTRL+C should abort it.
Leo
01-May-2012
Posted by: ErikJon at May 1, 2012 12:18 PM
Post a comment on "CHKDSK: What is it and how do I run it?":





Remember Me?

(You may use HTML tags for style)

Before commenting, please...

  • READ THE ARTICLE. A comment that shows you didn't will be deleted and ignored.

  • Comment only on the article. Use the search box at the top of the page if you have a question about something else.

  • NO PERSONAL INFORMATION in the comment. No email addresses. No phone numbers. No physical addresses.

  • Anything that looks the least bit like spam will be deleted. Links to unrelated sites or links that appear to be primarily promotional will be deleted, or the comment will be deleted.

  • Don't ask me to recover lost passwords or hacked accounts. I can't. Those comments will be deleted.

  • I can't respond to every comment. And I can't vouch for the accuracy of others who do.

Please wait. Your comment is being processed ...