Command Prompt: What It Is and How to Use It

Command Prompt is available in most Windows operating systems

Screenshot of a Windows 10 Command Prompt window

Command Prompt is a command line interpreter application available in most Windows operating systems. It is used to execute entered commands. Most of those commands automate tasks via scripts and batch files, perform advanced administrative functions, and troubleshoot or solve certain kinds of Windows issues.

Command Prompt is officially called Windows Command Processor, but it is also sometimes referred to as ​the command shell or cmd prompt or even by its filename, cmd.exe.

Command Prompt is sometimes incorrectly referred to as "the DOS prompt" or as MS-DOS itself. Command Prompt is a Windows program that emulates many of the command line abilities available in MS-DOS, but it is not MS-DOS.

How to Access Command Prompt

You open Command Prompt via the Command Prompt shortcut located in the Start menu or on the Apps screen, depending on your version of Windows.

Another way to access Command Prompt is via the cmd Run command or at its original location at C:\Windows\system32\cmd.exe, but using the shortcut is faster.

Note: Many commands can only be executed if Command Prompt is being run as an administrator.

How to Use Command Prompt

To use Command Prompt, you enter a valid Command Prompt command along with any optional parameters. Command Prompt then executes the command as entered and performs the task or function it's designed to perform in Windows.

A large number of commands exist in Command Prompt, but their availability differs from operating system to operating system. You can view which Command Prompt commands are compatible with a specific operating system here:

Commands must be entered into Command Prompt exactly. The wrong syntax or a misspelling could cause the command to fail or worse; it could execute the wrong command or the right command in the wrong way. A comfort level with reading command syntax is recommended.

Command Prompt Availability

Command Prompt is available on every Windows NT-based operating system which includes Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, and Windows 2000, as well as Windows Server 2012, 2008, and 2003.

Windows PowerShell, an advanced command line interpreter available in recent Windows versions, supplements the command executing abilities available in Command Prompt. Windows PowerShell may eventually replace the Command Prompt in a future version of Windows.