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.
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).
- 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.
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:
|Command||What they do|
|ASSOC||Displays or modifies file extension associations.|
|ATTRIB||Displays or changes file attributes.|
|BREAK||Sets or clears extended CTRL+C checking.|
|WMIC||Displays WMI information inside interactive command shell.|
|CD||Displays the name of or changes the current directory.|
|CHKDSK||Checks a disk and displays a status report.|
|CLS||Clears the screen.|
|COLOR||Sets the default console foreground and background colors.|
|COMP||Compares the contents of two files or sets of files.|
|CONVERT||Converts FAT volumes to NTFS.|
|COPY||Copies one or more files to another location.|
|DATE||Displays or sets the date.|
|DEL||Deletes one or more files.|
|DIR||Displays a list of files and subdirectories in a directory.|
|MODE||Configures a system device.|
|RMDIR||Removes a directory.|
|EXIT||Quits the CMD.EXE program (command interpreter).|
|FC||Compares two files or sets of files, and displays the differences.|
|FIND||Searches for a text string in a file or files.|
|FOR||Runs a specified command for each file in a set of files.|
|FORMAT||Formats a disk for use with Windows.|
|ICACLS||Display, modify, backup, or restore ACLs for files.|
|Prints a text file.|
|REN||Renames a file or 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.
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.”