This guide will help you get started with Windows’ Command Prompt.
Many Windows users have never used the Command Prompt. It’s simple to use Windows today without having to worry about typing old-fashioned text commands into the command line.
It’s worth learning the basics of command-line commands in Windows. This will help you to appreciate the OS and make it easier for certain tasks. For those not familiar with the Windows Command Prompt, here’s a guide for beginners.
What is the Command Prompt?
The Command Prompt is also known as the Windows Command Processor. It is often abbreviated as CMD. A command line interface allows you to interact with your computer using text commands.
These are reminiscent of the early days when computers were able to be used to enter commands into a terminal. MS-DOS was the first operating system to use command-line interfaces. No mouse cursor, window management or other graphical user interface elements (GUIs) were available in early PC operating systems.
A shell is another term that you need to know. It is a program that allows users to send commands to the computer. Both a GUI and a command-line interface are shells.
Windows 3.1 and earlier versions of Windows ran as a visual interface to DOS. MS-DOS integration was also available in later versions of Windows, such as Windows 95 and Windows ME. These enabled you to execute commands via the MS-DOS Prompt (or Command Prompt) at that time.
Windows XP was the first Windows release that broke away MS-DOS. Modern Windows versions allow you to use the Command Prompt instead of clicking through menus. You can also run batch files with the Command Prompt, making automating tasks simple.
The Command Prompt is preferred by power users for certain tasks. You can perform actions with just a few keystrokes, which would take dozens of clicks in a GUI.
How to open the Command Prompt in Windows 10 or Windows 11
There are several ways to open Windows’ Command Prompt. These are the easiest:
- To search for Command Prompt, type “command prompt” in the Start menu. If you prefer, you can also type “cmd”, which is the short name of executable that runs Command Prompt.
- To open the Run box press Win +, then press “cmd”, and hit Enter.
- Press Win + X Or right-click on the Start button and select Command Prompt From the menu.
- This may display Windows PowerShell, or Windows Terminal depending on your Windows settings. Both the new Windows Terminal or PowerShell are more powerful than the Command Prompt but they are still compatible with all CMD commands.
Any one of these commands will open the Command Prompt, but you’ll need regular permissions. Many useful commands will require administrator permissions. Regular CMD windows will not work because of this.
Hold Ctrl+ Shift to launch the Command Prompt in admin mode. Choose Command prompt (Admin) instead if you choose the third option. This will require that you accept the UAC prompt. To do this, you must be logged in to an admin account or have an admin password.
Basics: How to use the Windows Command Prompt
You’ll find basic information about the current Windows version when you open a Command Prompt Window. Below that, you will see the following:
This is the current location. This folder will contain any commands that depend on location, such as those for deleting files. Others CMD commands don’t require you to be in a particular location.
You must use the Command Prompt to enter commands exactly the way the system expects. Because you are directly sending commands to your computer, you won’t be able to understand what you have written.
If your computer does not recognize a command you have typed, it will display a message saying “[Command]” and Windows will not do anything.
This is not a problem. What is more dangerous is typing the wrong command or using a command you don’t want to use. You might tell the program to delete a file instead of deleting it.
As long as the option is valid, the command line will execute whatever you tell it. You should always double-check everything you are about to do before firing it off.
Basic Command Prompt Commands For Beginners
Command Prompt commands are numerous and not all are intuitive for beginners. It takes time to learn them, so you should pick up just a few commands at a time and build your knowledge slowly.
Let’s take a look at some CMD commands to show how it can be used for beginners. However, these commands are only a small portion of the Command Prompt’s capabilities. You can move on to more CMD commands. Also, take a look at our cheatsheet of useful Windows commands.
You can type help to see a list of common commands you can use. These commands will get you started so you don’t have to search for command names all by yourself.
You can search for more information on a particular command by typing it followed with ?. This will provide you with more information and allow you to modify the way it works.
Listing and changing directories
The dir command will display the contents of the current folder. You can verify this by looking at your current command’s folder.
To modify your current location, type cd followed by the folder that you wish to visit. You can mark the available folders with
When you run the dir command.
To move to your Desktop folder in your default user directory, type Cd Desktop. The cd.. shortcut allows you to move up one folder.
How to Create and Delete Files and Folders
To create a new directory, use mkdir (new folder name) (make director). mkdir Awesome Pics creates a folder named Awesome Pics.
rmdir (remove folder) will also delete a folder if it is empty.
To clear clutter from the Command Prompt’s screen type Cls. This will clear all existing content and allow you to start over. To cancel a command that is running, hit Ctrl+ C.
Networking commands are some of the most important Command Prompt commands. ping lets you check if your computer is able to reach remote destinations and how long it takes. ipconfig allows you to see the current network overview.
Common uses for the Command Prompt are to run troubleshooting commands. CHKDSK allows you to scan your storage drives and look for errors. SFC lets Windows detect and repair corrupt system files. See our comparison between SFC, CHKDSK and DISM.
Take the Command Prompt to the Next level
Even if you have never used the Command Prompt before, you should be familiar with its basics. If you are used to using the GUI for these tasks, the command line may feel awkward when managing files and folders. For other tasks like checking your IP address or managing files and folders, a quick CMD command will be more convenient than scrolling through many menus.
Although most CMD commands are only applicable to Windows, Windows 10 and higher allow you to use the Bash shell that is used by Linux, macOS and many other OSes. If you have multiple platforms, this is something worth knowing.