Windows Command Prompt

A lot of Windows users have never touched the Command Prompt. With today's streamlined operating systems, it's easy to use a computer without ever worrying about entering old-school text commands in the command line.

However, it's a good idea to become familiar with command line basics in Windows. It helps you appreciate the OS more and can come in handy for some tasks. Here's a beginner's guide to the Windows Command Prompt for those who aren't yet familiar.

What Is the Command Prompt?

The Command Prompt, officially called the Windows Command Processor and often abbreviated to CMD, is the command line interface for Windows operating systems. A command line interface is a way of interacting with a computer directly using text commands.

These go back to the early days of computers, when you had to type commands into a terminal to execute processes on the machine. Early PC operating systems, like MS-DOS, operated exclusively through command-line interfaces. There were no mouse cursor, window management, or similar graphical user interface (GUI) elements we take for granted today.

Another term you should know is the word "shell," which is used to describe a program that allows the user to give commands to the computer. So a command line interface, as well as a GUI, are both shells.

Early versions of Windows, like Windows 3.1, effectively ran as a visual interface on top of DOS. Later versions, including Windows 95 through Windows ME, also included MS-DOS integration. These allowed you to run commands through the MS-DOS Prompt, as the Command Prompt was called at the time.

Starting with Windows XP, Windows broke away from MS-DOS. However, in modern versions of Windows, you can still use the Command Prompt to interface with your computer directly instead of clicking through various menus. The Command Prompt can also run batch files; these make automating tasks easy.

Power users prefer the Command Prompt for some tasks, as you can take actions with a few simple keystrokes that would require dozens of clicks in the GUI.

How to Open the Command Prompt in Windows 10 and Windows 11

There are a few ways to open the Command Prompt in Windows. Below are the most convenient:

Depending on your Windows settings, this may show Windows PowerShell or Windows Terminal instead. The new Windows Terminal and PowerShell are both more powerful than the Command Prompt, but are backward-compatible with all CMD commands.

To run the Command Prompt as an admin, hold Ctrl + Shift when you launch either of the first two options above. If you use the third option, pick Command Prompt (Admin) (or the corresponding option that appears for you) instead. This will require you to accept a UAC prompt, so you'll need to be logged into an admin account or provide an admin password.

How to Use the Windows Command Prompt: Basics

When you open a Command Prompt window, you'll see some basic info about your current Windows version. Below this, you'll see a line like the image to the right.

This is your current location. Any commands you run that rely on location (such as deleting files) will take place in this folder. Other CMD commands are more general and don't rely on you being in a specific location.

It's important to know that when working in the Command Prompt, you must type commands exactly as the system expects. Since you're issuing commands directly to your computer, it won't understand if you type something wrong.

If you type a command that your computer doesn't recognize, you'll see a message that says '[Command]' is not recognized... and Windows won't do anything.

This isn't a problem; what's more of a risk is accidentally typing the wrong command, or using a command in a way you didn't intend. For example, when trying to delete one file, you might accidentally tell it to delete an entire folder instead.

The command line will run whatever you tell it, as long as it's a valid option. So you should always double-check what you're about to do before you fire it off, and don't use an admin Command Prompt for general purposes.

Here are some common commands you can use: help, chkdsk, ipconfig, and dir