What is a (DOS) Command Prompt & How to Run it in CMD?

Explore easy commands to get work done on your PC quickly

Reading time icon 6 min. read

Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

Key notes

  • CMD or Command Prompt is a command line interface known as Windows Command Processor.
  • Command Prompt commands can help you perform many operations without using a mouse.

Command Prompt is popular among normal users as well as professionals. It is a great way to complete your mundane tasks on the computer. It can run several commands, automate your tasks, and allow you to operate your PC via commands. 

This guide will talk about DOS Command Prompt, how to use it, and the most popular commands you must know. Let’s begin!

What is DOS Command Prompt?

Command Prompt is a command-line interface in Windows computers that lets you control your computer via text commands. Most of the text commands automate tasks using batch files and scripts. These commands can also troubleshoot common Windows problems and perform advanced administrative functions. 

Command Prompt is often called MS-DOS or the DOS prompt, but it is incorrect. Command Prompt is a program replicating command line abilities in MS-DOS but can’t be referred to as DOS.

How can I use Command Prompt?

You can use Command Prompt for various tasks, including checking and repairing system errors, moving a file, removing viruses, and creating a bootable media drive. All you need to do is fire up Command Prompt, type in the correct command, and press Enter to execute it.

To access Command Prompt, follow these steps: 

  1.  First, press the Windows key and type CMD and select Run as administrator.DOS COmmand Prompt
  2. You will get a UAC prompt; click on Yes.
  3. Now, the Command Prompt window will be open on your screen.

What are the most used commands on Command Prompt?

Before going through the popular command line utilities, make sure you keep these things in mind:

  • First, always run the command prompt as Administrator to avoid any error.
  • Please type or paste the command as mentioned for it to work properly
  • Press Enter after every command for it to execute.

Let’s check out some of the most used and helpful commands that you can keep handy:

1. Ping

To check whether there is network connectivity and reachability on your device, you can type the following command:PING

ping (website address)

2. System File Checker

SFC scan is a scan and repair tool that scans your computer for corrupt or missing files. Also, it replaces the damaged files with cached copies saved by the computer.



Deployment Image Servicing and Management fixes damaged or corrupted Windows operating system files and features directly via Windows online servers.

DISM /Online /Cleanup-Image /CheckHealth DISM /Online /Cleanup-Image /ScanHealth DISM /Online /Cleanup-Image /RestoreHealth

4. Installed drivers list

To get the list of installed device drivers on your computer, you can type the following command


5. Setup remote connection

With the below-mentioned command-line shell command, you can establish connections to remote computers or remote desktop session host servers. mstsc /v:

To launch and edit the RDP configuration file hostconnection.rdp, type this command: mstsc /edit hostconnection.rdp

6. Change the Directory

The command, when executed, helps you change the current working directory. In other words, with this, you can navigate to another folder on your computer.CD

To come out of a present directory C:\Windows\System32>cd\

To go to the following directory C:\>cd Windows\BrowserCore

7. Rename the file

REN and Rename are the same commands, and these are used interchangeably to rename a file or folder.RENAME COMMAND PROMPT

ren “original_filename.ext” “new_filename.ext”

8. Power Configuration

The command shows your computer’s power settings. It helps you manage and track the way your PC uses energy.

Detailed power consumption report of your computer powercfg /energy

 Point out the device that woke your PC from sleep powercfg /lastwake 

9. Boot in troubleshooting mode

This command can restart your PC and take you to the Advanced Start Options menu for troubleshooting.

shutdown/ r/o

10. System Information

If you want to know the system-related information, including OS, network card, System model, type, hostname, processor, etc., use this command:


11. Check Disk

If you want to check the drive’s file system integrity and repair the file system and problematic drive errors, this command can help you.


12. Manage Programs

WMICYou can get a list of installed programs on your computer and uninstall the programs you don’t need.

List of installed products wmic product get name

Uninstall a program product where name="Appname" call uninstall /nointeractive

13. Restore Network Settings

In case there is a network connection issue and you want to troubleshoot the network. These commands can help:


Clears all the IP addresses from the cache ipconfig /flushdns

Register DNS again ipconfig /registerdns

Release the IP address for the specific adapter ipconfig /release

Renew the IP address for the particular adapter ipconfig /renew

14. Check Wi-Fi Password

This command helps you check the password for your wired or wireless connections.

Replace SSID with your Wi-Fi name to get your Wi-Fi  password netsh wlan show profile SSID key=clear

15. Delete Temp files

This command helps you retrieve space on your computer by removing temporary files.

del /q /f /s %temp%\*

del /s /q C:\Windows\temp\*

16. Close Tasks

This command can be used to force stop a program or process. Replace executablename with the program or process name you want to kill.TASKKILL

taskkill /IM executablename

17. Compare Files

If you want to compare a file via its content and see the modifications made over time. Replace File 1 and File 2 with the actual file’s name.File compare

FC File 1.txt File 2.txt

18. List of Tasks

It shows the tasks running on your PC.


19. Network Statistics

It shows you all the details of the active TCP connections.


20. Hide/Unhide your folders

With this command, you can hide your important folders, and CMD can only reaccess these hidden folders.Hide Folder

Hide folder  Attrib +h +s +r "folder_name"

Unhide Folder Attrib -h -s -r "folder_name"

21. View or Modify File Extensions

This command shows you the file format and extensions of all files on your computer. 


Modify the extensions assoc .txt=.pdf  

22. Cipher: Delete Data Permanently

This command permanently wipes the data on a drive by writing random data. To do so,  type the following command. Instead of C, type the desired drive.CIPHER


23. Memory Diagnostic tool

If there is a problem with your RAM, you can run Windows Memory Diagnostic tool. Type the command mentioned and follow the on-screen instructions.


24. Virtual Keyboard

If you want to open the on-screen keyboard. Type osk

25. System Restore

With the command mentioned, you can launch the backup and restore the window to either create a backup or restore from the backup.


That’s it! These are some of the most useful DOS command prompt commands you can use to troubleshoot or perform daily tasks on your computer. 

Feel free to let us know your most used command on the command prompt in the comments section below.