In computing,
CHKDSK
(short for "check disk") is a
system tool and
command in
DOS,
Digital Research
Digital Research, Inc. (DR or DRI) was a company created by Gary Kildall to market and develop his CP/M operating system and related 8-bit, 16-bit and 32-bit systems like MP/M, Concurrent DOS, FlexOS, Multiuser DOS, DOS Plus, DR DOS ...
FlexOS,
IBM/
Toshiba 4690 OS, IBM
OS/2
OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 ...
,
Microsoft Windows and related
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
s. It verifies the
file system integrity of a
volume
Volume is a measure of occupied three-dimensional space. It is often quantified numerically using SI derived units (such as the cubic metre and litre) or by various imperial or US customary units (such as the gallon, quart, cubic inch). Th ...
and attempts to fix logical file system errors. It is similar to the
fsck
command in
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
and similar to
Microsoft ScanDisk, which co-existed with
CHKDSK
in
Windows 9x and
MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few oper ...
6.x.
Implementations
An early implementation of a 'CheckDisk' was the ''CHECKDSK'' that was a part of
Digital Equipment Corporation
Digital Equipment Corporation (DEC ), using the trademark Digital, was a major American company in the computer industry from the 1960s to the 1990s. The company was co-founded by Ken Olsen and Harlan Anderson in 1957. Olsen was president unti ...
hardware's diagnostics, running on early 1970s
TENEX and
TOPS-20
The TOPS-20 operating system by Digital Equipment Corporation (DEC) is a proprietary OS used on some of DEC's 36-bit mainframe computers. The Hardware Reference Manual was described as for "DECsystem-10/DECSYSTEM-20 Processor" (meaning the DEC PD ...
.
SCP 86-DOS
The
CHKDSK
command was first implemented in 1980 by
Tim Paterson and included in
Seattle Computer Products 86-DOS.
MS-DOS / IBM PC DOS

The command is available in
MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few oper ...
versions 1 and later.
CHKDSK
is implemented as an external command. MS-DOS versions 2.x - 4.x use
chkdsk.com
as the executable file. MS-DOS versions 5.x and later use
chkdsk.exe
as the executable file.
CHKDSK
can also show the memory usage, this was used before the command
MEM.EXE
was introduced in MS-DOS 4.0 to show the memory usage. In DR DOS the parameter
/A
limited the output to only show the memory usage.
MS-DOS 5.0 bug
CHKDSK
and
UNDELETE
in MS-DOS 5.0 have a bug which can corrupt data: If the
file allocation table of a disk uses 256 sectors, running
CHKDSK /F
can cause data loss and running
UNDELETE
can cause unpredictable results. This normally affects disks with a capacity of approximately a multiple of 128 MB. This applies to
CHKDSK.EXE
and
UNDELETE.EXE
bearing a datestamp of April 9, 1991. This bug was fixed in MS-DOS 5.0a.
Microsoft Windows
CHKDSK
can be run from
DOS prompt,
Windows Explorer
File Explorer, previously known as Windows Explorer, is a file manager application that is included with releases of the Microsoft Windows operating system from Windows 95 onwards. It provides a graphical user interface for accessing the file ...
,
Windows Command Prompt
Command Prompt, also known as cmd.exe or cmd, is the default command-line interpreter for the OS/2, eComStation, ArcaOS, Microsoft Windows ( Windows NT family and Windows CE family), and ReactOS operating systems. On Windows CE .NET 4.2, ...
,
Windows PowerShell
PowerShell is a task automation and configuration management program from Microsoft, consisting of a command-line shell and the associated scripting language. Initially a Windows component only, known as Windows PowerShell, it was made open-s ...
or
Recovery Console.
On
Windows NT
Windows NT is a proprietary graphical operating system produced by Microsoft, the first version of which was released on July 27, 1993. It is a processor-independent, multiprocessing and multi-user operating system.
The first version of Wi ...
operating systems,
CHKDSK
can also check the disk surface for
bad sectors and mark them (in
MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few oper ...
6.x and
Windows 9x, this is a task done by
Microsoft ScanDisk). The
Windows Server version of
CHKDSK
is
RAID-aware and can fully recover data in bad sectors of a disk in a
RAID-1 or
RAID-5 array if other disks in the set are intact.
Fragments of files and directories deemed as corrupt as a result of, for example, power outages while writing, file name overlength, and/or invalid characters in file name, are moved into a directory under the partition's root, named
found.000
, and renamed into generic hexadecimally numbered files and directories starting with
file00000000.chk
and
dir_00000000.chk
respectively.
On Windows NT family, a standard
CHKDSK
scan consists of three phases of testing file metadata. It looks for errors but does not fix them unless it is explicitly ordered to do so. The same applies to surface scan—this test, which could be extremely time-consuming on large or low-performance disks, is not carried out unless explicitly requested.
CHKDSK
requires exclusive write access to the volume to perform repairs.
Due to the requirement of the monopolized access to the drive, the
CHKDSK
cannot check the system disk in the normal system mode. Instead, the system sets a
dirty bit
A dirty bit or modified bit is a bit that is associated with a block of computer memory and indicates whether the corresponding block of memory has been modified. The dirty bit is set when the processor writes to (modifies) this memory. The bit in ...
to the disk volume and then reboots the computer. During the
Windows start-up, a special version of
CHKDSK
called
Autochk
(a
native mode application) is started by the
SMSS.EXE
Session Manager Subsystem, or , is a component of the Microsoft Windows NT family of operating systems, starting in Windows NT 3.1. It is executed during the startup process of those operating systems (it is the first user-mode process started b ...
and checks and attempts repairing the file system if the dirty bit is set.
Because of the exclusive access requirement and the time-consuming nature of
CHKDSK
operation,
Windows Vista
Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
implemented a new file system health model in which the operating system fixes errors on the volumes as it encounters them. In the event that the problem is grave and a full scan is required,
Action Center notifies the user to take the volume offline at the first convenience.
Windows Vista
Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
and
Windows Server 2008 added self-healing ability, turned on by default, in addition to providing the
CHKDSK
command. It detects physical file system errors and silently fixes them on the fly. Thus, many problems previously discovered on running
CHKDSK
never appear. It is administered by
fsutil repair
command.
Criticism has been aimed at the tendency of
AUTOCHK
to automatically modify the file system when not explicitly solicited by the user who may wish to
back up their data in prior, as an attempted repair may scramble, undermine and disown file and directory paths, especially on a
multiboot installation where multiple
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
s may have interferingly written to the same partition.
The alleged Windows 7 bug
Before the release of
Windows 7
Windows 7 is a major release of the Windows NT operating system developed by Microsoft. It was released to manufacturing on July 22, 2009, and became generally available on October 22, 2009. It is the successor to Windows Vista, released nearl ...
, ''
InfoWorld'' reported an alleged
memory leak in
CHKDSK
; according to the report, the
chkdsk /r
command would cause the memory consumption to reach the maximum and the system to
crash. Randall C. Kennedy of ''InfoWorld'' attributed the original report to "
various Web sources" and said that in his tests, the memory consumption reached above 90%, although he did not experience a crash. Nevertheless, Kennedy took the memory consumption for a critical bug that would derail Windows 7's launch and chastised Microsoft. Tom Warren of
Neowin dismissed Kennedy's assessment of the alleged leak's significance.
Steven Sinofsky of Microsoft also responded that Microsoft could not reproduce a crash either but that the massive memory consumption was by design, to improve performance, and not a leak.
Ed Bott of ''
ZDNet
ZDNET is a business technology news website owned and operated by Red Ventures.
The brand was founded on April 1, 1991, as a general interest technology portal from Ziff Davis and evolved into an enterprise IT-focused online publication.
H ...
'' also reviewed the claim with his own tests and observed that no crash would occur. Noting that
chkdsk /r
, by design, does not work on the
system drive while Windows is online, Bott concluded "it’s arguably a feature, not a bug, and the likelihood that you’ll ever crash a system this way is very, very small and completely avoidable."
DR/Novell DOS
DR DOS 6.0 also includes an implementation of the command.
FreeDOS
The
FreeDOS
FreeDOS (formerly Free-DOS and PD-DOS) is a free software operating system for IBM PC compatible computers. It intends to provide a complete MS-DOS-compatible environment for running legacy software and supporting embedded systems.
FreeDOS ca ...
version was developed by Imre Leber and is licensed under the
GNU GPL 2.
ReactOS

The ReactOS implementation is based on a
free
Free may refer to:
Concept
* Freedom, having the ability to do something, without having to obey anyone/anything
* Freethought, a position that beliefs should be formed only on the basis of logic, reason, and empiricism
* Emancipate, to procur ...
clone developed by
Mark Russinovich
Mark Eugene Russinovich (born December 22, 1966) is a Spanish-born American software engineer and author who serves as CTO of Microsoft Azure. He was a cofounder of software producers Winternals before it was acquired by Microsoft in 2006.
Ear ...
for
Sysinternals in 1998.
It was adapted to ReactOS by Emanuele Aliberti in 1999 and supports volumes using the
FAT32
File Allocation Table (FAT) is a file system developed for personal computers. Originally developed in 1977 for use on floppy disks, it was adapted for use on hard disks and other devices. It is often supported for compatibility reasons by ...
filesystem.
The command does not support volumes using the
Btrfs filesystem, although ReactOS supports it since version 0.4.1.
See also
*
Defragmentation
*
Data scrubbing
*
List of file systems
*
e2fsprogs
References
Further reading
*
*
*
External links
Official documentation about Microsoft CHKDSKOpen source CHKDSK implementation that comes with MS-DOS v2.0
{{Windows commands
External DOS commands
Hard disk software
Microsoft free software
MSX-DOS commands
OS/2 commands