Still, CMD Commands are very useful as there are some tasks that you can perform using Command Prompt only.
So, here are the Top 16 CMD Commands every Windows user must know:
Table of Contents
1. Assoc
Assoc is one of the most useful command prompt commands, which helps in listing all the file associations.
So, when you will type “assoc” in your command prompt, as a result, you will get all the file extensions(.txt, .mp3, .exe) and associated programs to open those files.
For example – to open a file with a .ppt extension, a program named “PowerPoint” is used. As a result, you will see the following list.
With the help of the assoc command, you can also change the program associated with a particular file extension.
For example – by typing “assoc .txt=” followed by any program name(Ex- word). You can change the program associated with the .txt file extension.
As a result, .txt is now associated with the program named “Word”.
Make sure to open the command prompt as administrator by right-clicking on the command prompt and choosing the “Run as administrator” option.
2. Chkdsk
Chkdsk stands for Check Disk. It is a command which is used for checking any type of error or malfunctioning in the disk and resolve or recover it if possible.
For example – you can use the command, “chkdsk /f ” followed by the disk name(C: , D: or E:) to scan that particular disk.
Make sure to open the command prompt as administrator by right-clicking on the command prompt and choosing the “Run as administrator” option.
3. Cipher
Cipher, as the name suggests, is used to encrypt the deleted files or data on your computer.
Whenever you delete any data or file on your computer. You get an empty or free space in your disk.
However, the deleted files are not completely removed from your computer and can be recovered whenever you want, until any other data is over overwritten to it.
So, if you want to permanently delete that data or make the deleted data unrecoverable. Then you can use the cipher command to do so.
For example – by typing “cipher /w:E:\” you can make the deleted data of drive E unrecoverable by overwriting it with the random data.
This command will not affect the undeleted data. It will only affect or overwrite the deleted data of the drive.
4. Color
The color command is used to change the background as well as foreground color of the command prompt window.
The syntax to use the color command is “color BGColor FGColor”, where BGColor stands for the Background Color and FGColor represent Foreground Color.
There is a list of different colors associated with the different hexadecimal numbers.
For example – If you type in “color 0b”, you will get the background as black color and foreground as aqua blue color, because here 0 represents black color and b represents an aqua blue color.
Similarly, you can try the different combinations of hexadecimal numbers accordingly.
5. Driverquery
Drivers are the set of software that is very useful and important for the proper functioning of a computer.
For example – A graphic driver is used for handling the graphics of your computer.
Driverquery is a command which is used for accessing the complete list of all the drivers installed on your computer.
So, all you have to do is just type “driverquery” in your command prompt and you will get the list of all the drivers on your PC.
If you want to get more details like – the location of directories where these drivers are installed.
Then you can use the command “driverquery -v” to do so.
6. File Compare
FC is a CMD Command which is used for comparing 2 different files.
So, if you want to compare the text between two files named file1.txt and file2.txt. Then you can do so with the help of the fc command.
All you have to do is just type “fc file1_location file2_location”.
You can also enhance the functionality by adding the attribute like – “/a” to perform the ASCII text comparison and “/b” to perform the binary comparison.
7. Ipconfig
Ipconfig is a very useful command if you want to perform network troubleshooting or you just want to access the information about your network, like – IP address, Subnet Mask, and Default gateway.
However, if you want to access more information, then you can use the ipconfig/all command.
8. Netstat
Netstat stands for Network Statistics. Netstat command is used for displaying the activities or details of your network connection.
So, you can type “netstat” in your command prompt and you will get all the details about the active TCP connection and ports, their IP address, and the state of the ports.
It is also useful if you want to detect malware or you want to find whether your computer is connected to a malicious connection over the Internet or not.
9. Nslookup
Nslookup stands for Nameserver Lookup. It is a command which is used for accessing information like – IP address, Nameserver, and many more, just with the help of the domain name of a website.
So, all you need to have is the domain name of the website and you can access the associated data with it.
For example – if you type “nslookup ” followed by the domain name of a website (thecoderpedia.com).
You will get the information (IP address, nameserver) associated with the website.
10. Ping
Ping is one of the most useful commands in networking. It helps you in testing and analyzing the connection of your computer with any other computer or server in a network.
It checks whether your computer has successfully connected to a particular server or not, by sending and receiving the series of packets from your computer to another computer or server.
For example – you can type in “ping” followed by the domain name or IP address of any website (thecoderpedia.com).
It will analyze your connection with that website (thecoderpedia.com).
11. Powercfg
If you are facing any issue related to battery or power consumption of your computer, then the powercfg command is for you.
This command will let you track the battery usage of your computer, by giving a complete report of the power consumption of the computer and shows the possible errors or issues.
All you have to do is just type in “powercfg /energy”.
As a result, it will generate an energy-report.html file for you which you can use to see the details about the power consumption in your computer.
Make sure to open the command prompt as administrator by right-clicking on the command prompt and choosing the “Run as administrator” option.
12. System File Checker
It is a very useful command as it helps in scanning your system files.
It checks for errors in the system and resolves it as well.
The syntax to use this command is “sfc /scannow” and it will start the scanning process.
Make sure to open the command prompt as administrator by right-clicking on the command prompt and choosing the “Run as administrator” option.
13. Shutdown
Shutdown command as the name suggests is used to shut down your computer.
If you are a command prompt lover, then this a command which you should use to shut down your computer.
To do so, you have to type in “shutdown /s”.
As a result, your computer will get turned off.
14. Systeminfo
This command is very useful if you want to know the complete information about your computer.
You just have to type in “systeminfo” in the command prompt.
It will show you the complete hardware as well as software configuration of your computer.
15. Tasklist
Most of us use the task manager to see the list of all the tasks running in the background of our computer.
However, you can see those tasks in the command prompt as well. All you have to do is just type “tasklist” in your command prompt.
It will show you the list of all the tasks running in the background of your computer.
The advantage of using this command over task manager is that the tasklist command shows you the hidden process as well.
16. Taskkill
Taskkill is a command which is used for killing the processes or tasks which are running in the background of your computer.
You can use the tasklist command to see the list of processes and then use the taskkill command to kill those processes accordingly.
The syntax to use the Taskkill command is “taskkill -pid ” followed by the process id of that particular process.
You can access the process id of any process with the help of the tasklist command.
Hope you like the article on Command Prompt Commands and understood the working of command prompt and how to use it.