chkdsk command (short for "Check Disk") is a Windows utility that scans disks and reports on the state of the partitions and the stored data. Use
chkdsk to repair drives and recover data from the damaged drive sectors.
This tutorial shows you how to use
chkdsk to detect errors and repair your Windows drives.
- Windows machine.
- User account with admin privileges.
- Access to Command Prompt or PowerShell.
Note: For the command that performs a similar function in Linux, refer to How to Use fsck Command.
chkdsk command can take one or more arguments. The basic
chkdsk command syntax is:
chkdsk [volume] [switches]
Volumes and switches are optional. Enter the base command to start the scan:
When you ran
chkdsk on its own, it scans the drives in read-only mode.
chkdsk without the
/F parameter on an active partition may produce false positives, so this method of partition scanning is not recommended.
Expand and customize the
chkdsk functionality by providing additional command-line arguments. The table below contains the list of the available options.
Note: The table mentions online and offline scanning. In the
chkdsk context, an online scan is performed while the volume is still mounted. An offline scan dismounts the volume to fix errors.
|Specify a volume for |
|Clear the list of bad clusters, re-scan the drive for errors, and recover readable information. Use this switch only with NTFS partitions.|
|Speed up the scanning process by skipping over folder structure cycles. Use the switch with NTFS partitions only.|
|Fix errors on the disk.|
|Prevent online repair and force offline repair of all errors. Use the switch only with NTFS partitions alongside the |
|Skip routine indexing checks and perform a fast drive scan. Use the switch with NTFS partitions only.|
|Change the log file size. If you do not state the size, |
|Scan and fix the volume offline.|
|Speed up the scan by using more system resources. Use the switch only with NTFS partitions alongside the |
|Scan for bad sectors and recover non-corrupted information. If the |
|Run an online scan. Use this switch with NTFS partitions only.|
|Immediately fix the errors. Use the switch with NTFS partitions only.|
|On FAT and FAT32 partitions, the option shows the paths of all the files on the disk. On NTFS partitions, it shows cleanup messages.|
|Force-dismount the drive and fix any errors on the disk.|
How to Run chkdsk
chkdsk is a command-line interface (CLI) tool available in Windows Command Prompt and Windows PowerShell. The following steps show how to access the CLI with the administrative privileges to run the command.
1. Click Start.
2. Type PowerShell. The Windows PowerShell item appears in the list of programs.
Note: To use
chkdsk in the Command Prompt, search for Command Prompt instead of PowerShell.
3. Select Run as Administrator in the pane on the right side.
The PowerShell window opens.
Combining the available switches with the
chkdsk command helps narrow the scan target and perform custom scans. The following are examples of using the
- Scan the
Cdrive for bad sectors and recover the readable information:
chkdsk C: /R
chkdsk cannot lock the drive, it displays the following message.
Y and press
Enter. Then restart the computer to complete the scan.
- Run an online scan of the NTFS-formatted
Cpartition but force
chkdskto perform all the fixes offline:
chkdsk C: /scan /forceofflinefix
The output show the scan stages.
If the scan finds any errors, they are repaired after the drive is dismounted. If there are no errors,
chkdsk displays a report.
- Scan and fix drive
Dbad sectors online, using the maximum allowed amount of system resources.
chkdsk D: /R /scan /perf
- Scan for disk errors on drive
Dand force the drive to dismount if necessary.
chkdsk D: /X
- Perform an online scan of drive
Cfor bad sectors, ignoring the previous bad sector records.
chkdsk C: /B /scan
This tutorial presented the
chkdsk command, a Windows CLI utility for scanning and repairing disks. After reading it, you should know how to scan and recover bad sectors and fix disk errors on your Windows system.
Learn more about data corruption by reading What is Data Corruption and Can You Prevent it?