DOSKEY is a utility for DOS and Microsoft Windows that adds command history, macro functionality, and improved editing features to the command line interpreters [[COMMAND.COM]] and [[CMD.EXE]]. It was included as a TSR program with MS-DOS and PC DOS versions 5 and later, then Windows 9x, and finally Windows XP and later.
In early 1989, functionality similar to DOSKEY was introduced with DR-DOS 3.40 with its [[HISTORY (CONFIG.SYS directive)|HISTORY]] CONFIG.SYS directive. This enabled a user-configurable console input history buffer and recall as well as pattern search functionality on the console driver level, that is, fully integrated into the operating system and transparent to running applications. In the summer of 1991, DOSKEY was introduced in MS-DOS/PC DOS 5.0 in order to provide some of the same functionality. DOSKEY also added a macro expansion facility, though special support was required before applications such as command line processors could take advantage of it. Starting with Novell DOS 7 in 1993, the macro capabilities were provided by an external DOSKEY command as well. In order to also emulate DOSKEY's history buffer functionality under DR-DOS, the DR-DOS DOSKEY worked as a front end to the resident history buffer functionality, which remained part of the kernel.
In current Windows NT-based operating systems, DOSKEY's functionality is built into CMD.EXE, although the DOSKEY command is still used to change its operation.