Windows has a plethora of command-line utilities at the user’s convenience. The chkdsk (pronounced as check disk) command is one such great exhibit. This command enables you to scan and verify the logical integrity of your system’s tertiary storage. It is designed to check the file system for any errors and also fix them.

You can also use multiple parameters to carry out the tool’s (Check Disk) actions in various permutations and combinations. On the whole, chkdsk is a beneficial instrument on your Windows 11 computer. In this guide, we’ll show how you can run the tool on your PC and make the most of it.

Why Should You Use CHKDSK?

The primary function of the chkdsk command is to check the integrity of the file system on the hard drive and make necessary fixes. The command can also fix bad sectors on your hard drive.

Bad sectors are further divided into ‘Soft bad sectors’ and ‘Hard bad sectors’. ‘Soft bad sectors’ are the logical bad sectors, and the chkdsk command can quickly fix them. ‘Hard bad sectors’, on the other hand, occur due to physical damage to the disk. Though chkdsk cannot repair them, it can definitely mark the sectors to avoid any data writing and prevent unexpected issues.

Here’s a list of issues the chkdsk command can reportedly solve:

  • Unable to read data from the hard disk
  • The computer is throwing boot errors
  • Sluggish or degraded performance when accessing files on the computer
  • The computer shuts down abruptly during a task

Run CHKDSK Using File Explorer

If you’re not very tech-savvy, Windows gives you the option to run the chkdsk command from the file explorer without typing any commands in the Command Prompt.

To do so, first double-click on the ‘This PC’ icon on your desktop. Alternatively, you can press the Windows + E shortcut on your keyboard to open it as well.

Now, right-click on the drive you wish to check and choose the ‘Properties’ option from the context menu.

Click the ‘Tools’ tab on the ‘Windows Properties’ window, and then click on the ‘Check’ button in the ‘Error Checking’ section.

If there are no errors on the drive, you might receive a prompt from the system stating so. In case you still wish to continue with the scanning, click on the ‘Scan drive’ option on the prompt. If not, hit ‘Cancel’.

The scan may take a while. Wait patiently while the process runs in the background.

If you wish to gain more control over the chkdsk command, you can invoke it using the Command prompt.


Run CHKDSK Using Command Prompt

While this method does not offer the convenience of GUI, it definitely offers complete control and more flexibility in using the commands with the help of parameters.

First, open Windows Terminal as administrator on your PC. Search for ‘Terminal’ in the Start menu and then right-click on the ‘Windows Terminal’ app from the results and select the ‘Run as administrator’ option from the context menu.

You will next see a UAC (User Account Control) window. If you are not logged in with an admin account, enter the necessary credentials for admin log-in. Otherwise, click on the ‘Yes’ button to launch an elevated window of the Windows Terminal.

Next, click the carat icon (downward arrow) on the Terminal window. Then, select the ‘Command Prompt’ option from the overflow menu. You can alternatively press Ctrl + Shift + 2 to access it as well.

Now, type or copy/paste the following command in the Command Prompt window and press Enter.

chkdsk /f

You may receive a prompt to schedule the chkdsk procedure on the next boot of your computer since the drive cannot be in use while the tool is running its operation. To schedule press Y on your keyboard. If not, press N.

Finally, shut down your computer from the Start menu and turn it back on. The chkdsk tool will automatically start scanning the storage volume before the PC boots up.


The Parameters For CHKDSK Command

chkdsk is a very versatile command and therefore, supports a variety of parameters. Here are all those parameters and their functions supported by the chkdsk command.

ParametersFunctions
/fScans and fixes errors on the disk. If the volume is in use, you will get a message to schedule the check on the next boot of the computer.
/vChecks the disk and displays the name of each file in every directory of your system.
/r Locates all the physical bad sectors on the drives and recovers readable information. Also includes the functionalities of the ‘/f’ parameter.
/x Force dismounts the volume if necessary and then scans and fixes the drive. Includes the functionality of the ‘/f’ parameter.
/iSkips certain volume checks for index entries to reduce the time required to run CHKDSK. Can only be used with the NTFS file system.
/c Only to be used with the NTFS file system. Skips the check cycles within the folder to structure to reduce the CHKDSK time.
/I[:<size>]Changes the log file size to the desired size. If used without the ‘size’ parameter, the command displays the current size. Can only be used with the NTFS file system.
/bThis parameter clears the current list of identified bad sectors on the volume and re-scans the allocated as well as free clusters for any errors. Also performs the functions of the ‘/r’ parameter. Mostly used after allocation of clusters on a new hard drive. Also, can only be used with the NTFS file system.
/scanRuns an online scan on the volume. Can only be used with the NTFS file system.
/forceofflinefix(Must be used with /scan) Bypass all online repair, all defects found are queued for offline repair.
/perf(Must be used with /scan) Increases the priority of the scan and increases the usage of system resources to complete the scan much faster. Might impact other running tasks negatively. Can only be used with the NTFS file system.
/spotfixThis parameter runs spot-fixing on the volume. Can only be used with the NTFS file system.
/sdcleanupGarbage collect unneeded security descriptor data (implies the ‘/f’ parameter). To be used with the NTFS file system only.
/offlinescanandfixRuns an offline scan and fixes the volume.
/freeorphanedchainsOrphaned cluster chains are freed instead of recovering their contents. To be used only with FAT/FAT32/exFAT file systems.
/markcleanMarks the volume clean if no corruption was detected, even in the case ‘/f’ parameter was not specified. Only works with FAT/FAT32/exFAT file systems.
/?Displays help and list of all supported parameters for CHKDSK.

CHKDSK Exit Codes

The chkdsk command returns exit codes after finishing the process. It is crucial to know these exit codes to know the outcome of the whole operation.

Exit CodeDescription
0No errors were found.
1Errors were found and fixed.
2Performed disk cleanup (such as garbage collection) or did not perform cleanup because the ‘/f’ parameter was not specified.
3Could not check the disk, errors could not be fixed. Or errors were not fixed because the ‘/f’ parameter was not specified.

And that’s it! The next time you’re faced with apps or your PC unexpectedly shutting down, the chkdsk command will come to your rescue, and with that, this guide too.