Command Prompt

Command Prompt (known as cmd.exe or cmd) is a text-only window where you can enter commands to the Windows operating system (95, 98, ME, NT/2000/XP, Vista, and 7) of your computer. Similar to Shell for Unix-based systems and Terminal on macOS. It can be used to change system settings, run administrative tasks, or execute commands that aren’t available in the standard graphical user interface (GUI).

If you’re looking to get started with Command Prompt but aren’t sure where to begin, read on as we introduce some basic commands and explain why they are so useful in day-to-day computer use.

How to Open the Command Prompt in Windows?

In Windows 10

  • Click the Windows icon and search for cmd. Now, select it from the list when it appears.
seach for cmd

In Windows 8

  • Move the mouse pointer to the very bottom-left corner of the screen or right-click or Press the Windows + X key.
  • Select Command Prompt (Admin).
Select Command Prompt (Admin).
  • This will open the Command Prompt window.

Windows Vista and 7

  • Click Start and Type cmd in the Search Box.
  • In the search results, Right-Click on cmd and select Run as administrator.
Run as administrator

How to use the Command Prompt?

By following the steps, the command prompt will open. Now, you’ll now see a large black window with the cursor at the end of the path to your user profile in C:\Documents and Settings\Username or C:\Users\Username.

Now, you’ll probably want to end up using some of the help guides that are provided in cmd, type in HELP, and press Enter. When you do that, you’ll get a list of all the commands you can use in the command prompt and a short description of what they do:

CommandWhat they do
ASSOCDisplays or modifies file extension associations.
ATTRIBDisplays or changes file attributes.
BREAKSets or clears extended CTRL+C checking.
SORTSorts input.
WMICDisplays WMI information inside interactive command shell.
CDDisplays the name of or changes the current directory.
CHKDSKChecks a disk and displays a status report.
CLSClears the screen.
COLORSets the default console foreground and background colors.
COMPCompares the contents of two files or sets of files.
CONVERTConverts FAT volumes to NTFS.
COPYCopies one or more files to another location.
DATEDisplays or sets the date.
DELDeletes one or more files.
DIRDisplays a list of files and subdirectories in a directory.
MODEConfigures a system device.
RMDIRRemoves a directory.
EXITQuits the CMD.EXE program (command interpreter).
FCCompares two files or sets of files, and displays the differences.
FINDSearches for a text string in a file or files.
FORRuns a specified command for each file in a set of files.
FORMATFormats a disk for use with Windows.
ICACLSDisplay, modify, backup, or restore ACLs for files.
PRINTPrints a text file.
RENRenames a file or files.
REPLACEReplaces files.

For more information on tools see the command-line reference in the online help.

How many commands are there in cmd?

The Command Prompt in Windows provides access to over 280 commands. These commands are used to do certain operating system tasks from a command-line interpreter instead of the graphical Windows interface we use most of the time.

How to disable the Command Prompt?

  • Click Start and type gpedit.msc in the Windows Search box.
  • In the Group Policy window, browse to the User Configuration\Administrative Templates and highlight the System folder.
  • In the System folder, double-click “Prevent access to the command prompt.
  • Change the Setting to Enabled. Click Ok.

By entering the command prompt, you receive a message similar to the example below.

The command prompt has been disabled by your administrator.
Press any key to continue.

Note: If you want to re-enable this feature, follow the above steps. However, instead of setting the option to “Enabled,” change it to the default setting of “Not configured.”