One of the oldest command line interpreters to ship with Windows was called Command Prompt, or simply CMD by many. This tool was modeled after that of the original MS-DOS operating system, and it was the only command line tool available on Windows for many years. It was a very simple tool, but it was very powerful.
Over the years Microsoft didn't update the classed CMD prompt much, until it was eventually replaced by a new command line tool called PowerShell. PowerShell was a much more powerful tool, and it was designed to be more flexible and easier to use than the old CMD prompt. It was also designed to be cross-platform, meaning that it could be used on Windows, Linux, and Mac computers.
Note: The new Windows Terminal is the best way to access both CMD and PowerShell. Read more about Windows Terminal below.
After reading about CMD and PowerShell, you may want to head to the Windows Store and install the new Windows Terminal application. This is the best way to access both CMD and PowerShell.
Windows CMD vs PowerShell
In order to access a command line prompt, you need some sort of command line interpreter. On Windows, there are two main command line interpreters: Windows CMD and PowerShell.
CMD and PowerShell are both command line tools that you can use to run commands on your computer. They are both very powerful tools, and they both have their own strengths and weaknesses.
If you are just starting out with learning to use the CLI on Windows, then you should start with PowerShell. PowerShell is a much more powerful tool, and it is the future of the command line on Windows. It is also cross-platform, meaning that you can use it on Linux and Mac computers as well.
Unfortunately, PowerShell was not backwards compatible with the old CMD prompt, and it was not a drop-in replacement. This meant that many people were not able to use PowerShell, and they were stuck using the old CMD prompt. This was a problem for many people, because the CMD prompt was not as powerful as PowerShell, and it was not as easy to use.
Many command line examples online are written in the classic CMD prompt, and they will not work in PowerShell. This is because PowerShell uses a different syntax than the classic CMD prompt. This is a problem for many people, because they are not able to use the examples that they find online.
In order to launch PowerShell, you need to open the Start menu, and then type in "PowerShell". You should see a program called "Windows PowerShell" appear in the search results. Click on this program to launch it.
By default, PowerShell has a blue background with white text, and it looks like this:
Before you get too used to this method of launching PowerShell, read on about the new Windows Terminal.
In order to launch the classic CMD prompt, you need to open the Start menu, and then type in "CMD". You should see a program called "Command Prompt" appear in the search results. Click on this program to launch it.
By default, the classic CMD prompt has a black background with white text, and it looks like this:
Like PowerShell, the classic CMD prompt is also available in the new Windows Terminal, and you should be using that instead.
In addition to the traditional CMD and PowerShell command line interpreters, Microsoft recently released a new Windows Terminal for Windows that is a cross-platform command line client that can run CMD, PowerShell, and other command line interpreters. You can think of Windows Terminal as an application that wraps around the traditional CMD and PowerShell command line interpreters.
When you launch the Windows Terminal, it opens a new tab with the PowerShell command line interpreter. You can also launch the CMD command line interpreter if you need to run classic CMD commands that are not supported by PowerShell, but that should rarely be needed for most users.
The Windows Terminal is very good, and you should be using it now. It is a much better tool than the traditional CMD and PowerShell command line interpreters, and it is the future of the command line on Windows.
You can install the Windows Terminal from the Microsoft Store.
When Should You Use CMD Instead of PowerShell
While PowerShell running through Windows Terminal is the future of the command line on Windows, there are still some situations where you should use the classic CMD prompt instead of PowerShell. One of the best examples of things that do not work well in PowerShell is any commands that have a percent sign in them, such as this:
In classed windows CMD, this will print your system path to the screen. In PowerShell, this will print the string literal %path% to the screen. This is because PowerShell uses a different syntax than the classic CMD prompt, and it does not support the percent sign syntax.
In addition, many complex batch constructs like looping and conditional statements do not work well in PowerShell. If you need to use these constructs, then you should use the classic CMD prompt instead of PowerShell. A good rule of thumb is to try your commands first in PowerShell, and only if they do not work correctly, then fall back on the classic CMD prompt.
Try your commands in PowerShell first. If they do not work, then resort to CMD.
Getting the New Windows Terminal
The new Windows Terminal is available in the Microsoft Store. To get to the Microsoft Store simply tap your Windows key, and then type in "Microsoft Store". You should see a program called "Microsoft Store" appear in the search results. Click on this program to launch it.
Then search for Windows Terminal in the Microsoft Store, and install it. There are many customization options available in the Windows Terminal, and you can read more about them in the official documentation.