Command Prompt - What It Is and How to Use It

All About Command Prompt, What It's For, and How to Get There

Screenshot of a Windows 10 Command Prompt window
Command Prompt (Windows 10).

Command Prompt is a command line interpreter application available in most Windows operating systems.

Command Prompt is used to execute entered commands. Most of those commands are used to automate tasks via scripts and batch files, perform advanced administrative functions, and troubleshoot and solve certain kinds of Windows issues.

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

Note: 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 actually MS-DOS.

How to Access Command Prompt

You can open Command Prompt via the Command Prompt shortcut located in the Start Menu or on the Apps screen, depending on what version of Windows you have.

See How Do I Open Command Prompt? for more detailed help if you need it.

Another way to access Command Prompt is via the cmd run command but using the shortcut, or one of the other methods described in the how-to I linked to, is probably faster.

Important: Many commands can only be executed if Command Prompt is being run as an administrator. See How To Open an Elevated Command Prompt for more details.

How to Use Command Prompt

To use Command Prompt, you must enter a valid command along with any optional parameters.

Command Prompt then executes the command as entered and performs whatever 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. See my table of Command Availability Across Microsoft Operating Systems for a quick comparison.

You might also want to see my List of Command Prompt Commands which is essentially the same as the table but with descriptions of each command and information about when it first appeared, or why it was retired.

I also keep operating system specific lists of commands as well:

Important: Commands must be entered into Command Prompt exactly. Wrong syntax or a misspelling could cause the command to fail or worse, could execute the wrong command or the right command in the wrong way. See How to Read Command Syntax for more information.

See Command Prompt Tricks and Hacks for more information on some of unique things you can do in the Command Prompt.

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, Windows 2000, as well as Windows Server 2012/2008/2003.

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

Note: In Windows 98 & 95, the command line interpreter is In MS-DOS, is the default user interface. I do keep a List of DOS Commands if you happen to still use MS-DOS or are otherwise interested.