# List of DOS commands

DOS commands are the text instructions typed at the command prompt of MS-DOS and compatible operating systems to navigate directories, manage files, configure the system, and run batch scripts. They are entered through a command interpreter, historically `COMMAND.COM`, and fall into two classes: internal commands built into the interpreter itself, and external commands stored as separate programs on disk.<sup>[1](https://staff.frontierpubs.co.uk/chapter/dos-internal-and-external-commands)</sup>

| Key fact | Detail |
|---|---|
| Interpreter | `COMMAND.COM` is the DOS command-line shell; FreeDOS's compatible shell, FreeCOM, is also named `COMMAND.COM`<sup>[2](https://help.freedos.org/docs/howto/bat.html)</sup> |
| Command classes | Internal commands are stored within the command interpreter in memory; external commands are separate programs that DOS searches for on disk<sup>[1](https://staff.frontierpubs.co.uk/chapter/dos-internal-and-external-commands)</sup> |
| Case sensitivity | DOS is case insensitive; commands may be typed in uppercase, lowercase, or mixed case<sup>[3](https://help.freedos.org/docs/howto/linux.html)</sup> |
| Navigation | `CD` changes directories, `DIR` lists files, `MD`/`MKDIR` creates directories, `RD`/`RMDIR` removes them, and `TREE` shows a directory tree<sup>[4](https://help.freedos.org/docs/howto/cddir.html)</sup> |
| File operations | `TYPE` and `MORE` display file contents, `REN`/`RENAME` renames files, `DEL`/`ERASE` deletes files, and `EDIT` opens a text editor<sup>[4](https://help.freedos.org/docs/howto/cddir.html)</sup> |
| Built-in help | FreeDOS accepts a `/?` parameter on any command for brief instructions, and `HELP` starts an interactive help system<sup>[4](https://help.freedos.org/docs/howto/cddir.html)</sup> |
| Compatibility rule | The FreeDOS Spec requires all FreeDOS programs to be 100% compatible with MS-DOS commands out of the box, with extra features added only as extensions<sup>[5](https://help.freedos.org/docs/about/fdspec.html)</sup> |

## Internal and external commands

The distinction between the two classes is practical rather than functional. Internal commands such as `DIR`, `CD`, and `CLS` are part of the command interpreter and are available whenever the prompt is showing, because their code is loaded with `COMMAND.COM` into memory. External commands such as `FORMAT`, `[CHKDSK](https://www.edgepedia.org/chkdsk)`, or `EDIT` are ordinary executable files; when one is entered, MS-DOS searches the disk for the matching program and runs it.<sup>[1](https://staff.frontierpubs.co.uk/chapter/dos-internal-and-external-commands)</sup> The same split exists on [Unix-like](https://www.edgepedia.org/unix-like) systems, where built-in shell commands coexist with external programs such as `/bin/ls`.<sup>[6](https://docstore.mik.ua/orelly/unix3/upt/ch01_09.htm)</sup>

The FreeDOS Spec makes the split a design choice rather than a fixed rule: commands may be implemented either inside the shell or as external programs, with no restriction on which must be which, except for a few batch commands. This is a deliberate variation from MS-DOS.<sup>[5](https://help.freedos.org/docs/about/fdspec.html)</sup>

## Core commands

DOS navigation rests on a small set of commands. `CD` (change directory) moves up or down the directory hierarchy, using the `..` special name for the parent directory; typing a drive letter followed by a colon, such as `D:`, switches the working drive. `DIR` lists the files and subdirectories of the current or a specified directory, and can save its output to a file with redirection.<sup>[3](https://help.freedos.org/docs/howto/linux.html)</sup><sup> • </sup><sup>[4](https://help.freedos.org/docs/howto/cddir.html)</sup> Directory names are usually displayed in all uppercase, but can be referenced in any case.<sup>[4](https://help.freedos.org/docs/howto/cddir.html)</sup>

**File and directory management.** Besides moving around the file system, the standard command set offers `MKDIR` or `MD` for making new directories, `RMDIR` or `RD` for getting rid of them, `TREE` for listing directories and their subdirectories as a branching diagram, `TYPE` and `MORE` for showing what files contain, `RENAME` or `REN` for changing file names, `DEL` or `ERASE` for removing files, `EDIT` for modifying them, and `CLS` for wiping the screen clean.<sup>[4](https://help.freedos.org/docs/howto/cddir.html)</sup> Many commands have a short and a long spelling that behave identically, a convention carried over from the need to type quickly on early systems.

**Getting help.** In FreeDOS, appending `/?` to any command prints brief usage instructions, and typing `HELP` opens an interactive help system.<sup>[4](https://help.freedos.org/docs/howto/cddir.html)</sup> The commercial MS-DOS releases shipped a comparable reference: the MS-DOS 6.22 command reference describes every command Microsoft provided in the standard package, and the built-in MS-DOS Help gives syntax, notes on how each command works, and examples.<sup>[7](https://www.infania.net/misc/dos622help/)</sup><sup> • </sup><sup>[8](https://www.bitsavers.org/pdf/microsoft/msdos_6.22/DOS_6.22_Users_Manual_1994.pdf)</sup>

## Batch scripting

The shell is also a scripting environment. Batch files, named for their `.BAT` extension, automate sequences of commands, and the FreeCOM shell parses their command lines much as it parses typed input.<sup>[2](https://help.freedos.org/docs/howto/bat.html)</sup> The first nine arguments passed to a batch file are stored in the special variables `%1` through `%9`, and environment variables are referenced by wrapping the name in [percent signs](https://www.edgepedia.org/percent-sign), as in `%[PATH](https://www.edgepedia.org/path-variable)%`.<sup>[2](https://help.freedos.org/docs/howto/bat.html)</sup> Programs return status codes that batch files can test through the `ERRORLEVEL` variable, which FreeDOS defines for examining a program's return codes.<sup>[2](https://help.freedos.org/docs/howto/bat.html)</sup>

Microsoft's own history of the command line describes the MS-DOS shell as providing a simple but relatively effective set of commands together with a command-scripting syntax for writing `.bat` files, an architecture that carried forward into Windows.<sup>[9](https://devblogs.microsoft.com/commandline/windows-command-line-the-evolution-of-the-windows-command-line/)</sup>

## Compatibility across DOS implementations

The command set is the main compatibility contract between DOS implementations. The FreeDOS Spec requires that all FreeDOS programs reproduce MS-DOS command behavior out of the box, with any additional features offered as extensions or through different command-line options or configuration files; the spec addresses only commands that reproduce MS-DOS functionality.<sup>[5](https://help.freedos.org/docs/about/fdspec.html)</sup> FreeDOS itself is a free, open-source remake of DOS that remains in active development, with release 1.4 available as a bootable distribution.<sup>[10](https://www.techradar.com/news/best-alternative-operating-systems)</sup><sup> • </sup><sup>[11](https://www.freedos.org/download/)</sup>

Emulators follow the same contract. DOSBox, which recreates an MS-DOS-compatible environment, supports most of the DOS commands found in `command.com`, and typing `HELP` at its prompt lists the internal commands it provides.<sup>[12](https://www.dosbox.com/DOSBoxManual.html)</sup> Because an emulator must bridge the emulated machine to the host filesystem, DOSBox adds commands of its own that no retail DOS shipped: `MOUNT` connects a host folder or drive to an emulated drive letter, `MOUNT -u` removes the connection, and `IMGMOUNT` attaches disk images such as ISO files as emulated volumes.<sup>[12](https://www.dosbox.com/DOSBoxManual.html)</sup><sup> • </sup><sup>[13](https://www.dosbox.com/wiki/MOUNT)</sup>

## Naming constraints and history

The commands operate on a filesystem with tight name limits. The MS-DOS FAT file system supports a maximum of 8 characters for the base file name and 3 for the extension, 12 characters including the dot separator, the convention known as 8.3 naming; any longer name counts as a long file name.<sup>[14](https://learn.microsoft.com/en-gb/windows/win32/fileio/naming-a-file)</sup>

The command set dates to the operating system's first release. MS-DOS shipped with the IBM PC in 1981, beginning the Microsoft-IBM partnership on the platform.<sup>[15](https://www.computerhistory.org/timeline/1981/)</sup> The shell itself is old enough to have surviving source: Microsoft's re-open-sourced MS-DOS 1.25 code, dating from around May 9, 1983, comprises just 7 source files, including the original command-line shell, `COMMAND.ASM`.<sup>[16](https://devblogs.microsoft.com/commandline/re-open-sourcing-ms-dos-1-25-and-2-0/)</sup> Later versions extended the set; a Microsoft knowledge-base archive tabulates external MS-DOS commands by the version at which each was introduced, and the [Windows 95](https://www.edgepedia.org/windows-95) and 98 versions of `COMMAND.COM` enhanced some DOS 6.22 commands, dropped others, and moved a few dropped commands to the CD-ROM.<sup>[17](https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/72188)</sup><sup> • </sup><sup>[18](https://www.fadelk.com/files/Resources/205/Main/MSDOS003CommandReference.pdf)</sup>

## References

1. [DOS internal and external commands, Frontier Publishing](https://staff.frontierpubs.co.uk/chapter/dos-internal-and-external-commands)
2. [Automate tasks with BAT files, FreeDOS Documentation Project](https://help.freedos.org/docs/howto/bat.html)
3. [FreeDOS commands for Linux users, FreeDOS Documentation Project](https://help.freedos.org/docs/howto/linux.html)
4. [Get around with CD and DIR, FreeDOS Documentation Project](https://help.freedos.org/docs/howto/cddir.html)
5. [The FreeDOS Spec, FreeDOS Documentation Project](https://help.freedos.org/docs/about/fdspec.html)
6. [Internal and External Commands, Unix Power Tools, 3rd Edition](https://docstore.mik.ua/orelly/unix3/upt/ch01_09.htm)
7. [MS-DOS v6.22 Help: Command Reference](https://www.infania.net/misc/dos622help/)
8. [MS-DOS 6.22 User's Manual (1994), Bitsavers](https://www.bitsavers.org/pdf/microsoft/msdos_6.22/DOS_6.22_Users_Manual_1994.pdf)
9. [Windows Command-Line: The Evolution of the Windows Command-Line, Microsoft DevBlogs](https://devblogs.microsoft.com/commandline/windows-command-line-the-evolution-of-the-windows-command-line/)
10. [Best alternative operating systems, TechRadar](https://www.techradar.com/news/best-alternative-operating-systems)
11. [Download FreeDOS 1.4, The FreeDOS Project](https://www.freedos.org/download/)
12. [DOSBox v0.74-3 Manual](https://www.dosbox.com/DOSBoxManual.html)
13. [MOUNT, DOSBoxWiki](https://www.dosbox.com/wiki/MOUNT)
14. [Naming Files, Paths, and Namespaces, Microsoft Learn](https://learn.microsoft.com/en-gb/windows/win32/fileio/naming-a-file)
15. [1981 Timeline of Computer History, Computer History Museum](https://www.computerhistory.org/timeline/1981/)
16. [Re-Open-Sourcing MS-DOS 1.25 and 2.0, Windows Command Line blog](https://devblogs.microsoft.com/commandline/re-open-sourcing-ms-dos-1-25-and-2-0/)
17. [MS-DOS Command Extension Table by Version, Microsoft KB Archive/72188](https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/72188)
18. [MS-DOS Technical Reference: Command Reference (internal commands in DOS 6.22, Windows 95, Windows 98)](https://www.fadelk.com/files/Resources/205/Main/MSDOS003CommandReference.pdf)

---
*Topic: Encyclopedia › Technology and the built world › Computing and digital systems › Software and programming › Operating systems › Operating system concepts*

*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
