- 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:
- First, press the Windows key and type CMD and select Run as administrator.
- You will get a UAC prompt; click on Yes.
- 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:
To check whether there is network connectivity and reachability on your device, you can type the following command:
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.
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.
To come out of a present directory
To go to the following directory
7. Rename the file
REN and Rename are the same commands, and these are used interchangeably to rename a file or folder.
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
Point out the device that woke your PC from sleep
9. Boot in troubleshooting mode
This command can restart your PC and take you to the Advanced Start Options menu for troubleshooting.
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
You can get a list of installed programs on your computer and uninstall the programs you don’t need.
List of installed products
product get name
Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.
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
Register DNS again
Release the IP address for the specific adapter
Renew the IP address for the particular adapter
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 /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.
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.
Attrib +h +s +r "folder_name"
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
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.
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
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.
Still having issues? Fix them with this tool:
If the advices above haven't solved your issue, your PC may experience deeper Windows problems. We recommend downloading this PC Repair tool (rated Great on TrustPilot.com) to easily address them. After installation, simply click the Start Scan button and then press on Repair All.