A lot of Windows users take never touched the Command Prompt. With today's streamlined operating systems, information technology'southward easy to apply a computer without ever worrying about inbound old-school text commands in the control line.

Withal, it's a good idea to get familiar with command line basics in Windows. Information technology helps you appreciate the Bone more and can come in handy for some tasks. Hither's a beginner'due south guide to the Windows Command Prompt for those who aren't all the same familiar.

What Is the Command Prompt?

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

These hearken back to the early days of computers, when yous had to type commands into a final to execute processes on the machine. Early PC operating systems, like MS-DOS, operated exclusively through control-line interfaces. There were no mouse cursor, window management, or like graphical user interface (GUI) elements nosotros 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 reckoner. And so a control line interface, too as a GUI, are both shells.

Early versions of Windows, like Windows iii.ane, effectively ran equally a visual interface on peak of DOS. Later on 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 bankrupt away from MS-DOS. However, in modern versions of Windows, you tin notwithstanding use the Command Prompt to interface with your computer directly instead of clicking through diverse menus. The Command Prompt tin also run batch files; these make automating tasks easy.

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

How to Open up the Command Prompt in Windows ten and Windows 11

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

  1. Blazon "control prompt" into the Start menu to search for information technology. You can also type "cmd" (the short name of the executable that runs the Command Prompt) if you prefer.
  2. Press Win + R to open up the Run box, then type "cmd" and striking Enter to open it.
  3. Press Win + X (or right-click the Start push) and choose Control Prompt from the menu.
    1. Depending on your Windows settings, this may show Windows PowerShell or Windows Terminal instead. The new Windows Terminal and PowerShell are both more than powerful than the Command Prompt, merely are backward-compatible with all CMD commands.
Windows Open CMD Prompt

Any of these will open up the Control Prompt with regular permissions. A lot of useful commands crave you to have administrator permissions, which will fail with a regular CMD window.

To run the Command Prompt equally an admin, hold Ctrl + Shift when you lot launch either of the first two options above. If y'all use the third pick, option Command Prompt (Admin) (or the corresponding option that appears for you) instead. This volition require y'all to take a UAC prompt, so you'll demand to exist logged into an admin account or provide an admin password.

How to Use the Windows Command Prompt: Basics

When you lot open a Command Prompt window, yous'll see some basic info about your current Windows version. Below this, y'all'll run across a line like the beneath:

C:\Users\[Username]>

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

Information technology's of import to know that when working in the Command Prompt, you must type commands exactly as the organization expects. Since you lot're issuing commands directly to your figurer, it won't understand if you blazon something wrong.

If you type a command that your calculator doesn't recognize, you'll see a message that says '[Control]' is non recognized... and Windows won't practice annihilation.

Command Prompt Command Not Recognized

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

The control line will run any you tell it, as long as it'southward a valid selection. So you should always double-check what you're about to practise earlier you fire information technology off, and don't utilize an admin Control Prompt for general purposes.

Basic Command Prompt Commands for Beginners

At that place are lots of Command Prompt commands, and most of them aren't intuitive for newcomers. Learning them takes some time, so it'due south best to pick up a few at a fourth dimension and slowly build your knowledge.

Let'due south look at a handful of CMD commands that illustrate its use for a beginner. These are just a very small sampling of what the Control Prompt can do, notwithstanding. When y'all're ready to move on, take a look at more than CMD commands you should know, also as our cheat canvas of handy Windows commands.

Getting Aid

CMD Help Example Commands

Typing help will list many common commands that you can use. These will become you started, and then you don't have to go looking for command names on your own.

If you'd like more than specific information about how to use a certain command, type it followed past /?. This will give you more help, plus boosted options for modifying how it works.

Listing and Changing Directories

Windows Directory Command Example

The dir command, which is brusque for directory, will listing the contents of the binder that you're currently in. As mentioned before, y'all tin check this past looking at the folder that appears to the left of your current control.

To change your current location, use cd (brusk for modify directory) followed by the binder you want to visit. Bachelor folders are marked with <DIR> when you run the dir control.

So for case, to move to your Desktop folder from your default user folder, y'all would type cd Desktop. You can move upward one folder by using the cd.. shortcut.

Creating and Deleting Files and Folders

Use mkdir [new folder name] (make directory) to create a new folder. For instance, mkdir Awesome Pics will make a binder chosen Awesome Pics.

Similarly, rmdir [binder proper name] (remove directory) volition delete a folder, but only if it's empty. To delete a file, employ del [file name].

CMD Management

If at that place's as well much clutter on the Control Prompt'south screen, type cls to clear the contents and start fresh. And if there's a command running that you want to cancel (perhaps it's taking too long), striking Ctrl + C to end it.

Networking Commands

Some of the most useful Command Prompt commands bargain with networking. Commands like ping let you lot see if your calculator tin reach a remote destination and how long it takes. Meanwhile, ipconfig lets you see the network overview for your electric current connection.

Ping CMD Example

Learning near CMD commands for managing networks is thus a keen apply of the tool.

Commands for Troubleshooting

A common utilise for firing upward the Command Prompt is to run 1 of several troubleshooting commands. CHKDSK lets you scan your storage drives for errors, while SFC allows Windows to discover and fix corrupt system files. For more than, see our comparison of CHKDSK, SFC, and DISM.

Taking the Command Prompt to the Next Level

At present you're familiar with the basics of the Command Prompt, even if you've never used it before. Some tasks, like managing files and folders, volition probably feel clunky in the control line if y'all're used to doing these with the GUI. But for other tasks, like checking your IP address, running a quick CMD control is much more user-friendly than clicking through a agglomeration of menus.

While most CMD commands are specific to the Windows environment, Windows x and subsequently likewise allow yous to run the Bash shell used by Linux, macOS, and many other OSes. This is worth learning almost if yous use multiple platforms.

How to Go the Linux Terminal Using Windows Subsystem for Linux

Read Next

Near The Author