Perhaps the Windows command line is one of the greatest unknown within Microsoft’s operating system. Well, we have 15 commands that we should know and that are going to be more interesting than you think.
The fact that many people have never even used the command prompt is significant in how little importance this part of Windows is increasingly being given within the operating system itself.
It is the faithful reflection of a bygone era where everything was done through text and it worked in a different way than what we have today.
In any case, within the CMD there are several commands that are interesting and that we should know about, since they are useful for both Windows 10 and Windows 11.
All the tools that we are going to tell you are accessed from, as we are already telling you, the command line to which you can enter typing CMD in Windows search bar and executing it whenever you want in the next window to search.
From there you can experiment with the commands that we are going to show you below.
As you well know, all Windows files (or the vast majority) are associated with a program which is in charge of opening them. Well, with Assoc we can see all these associations to remember.
We will see a list of file extensions and which program is associated with each of them. We will even have the opportunity to change some association if we write, for example, assoc .txt = and after the equal we put the program with which it should open it.
Driverquery what it does is show all drivers that is at that moment in our computer. Can be extended with driverquery -v for more information, including the directory where the driver is installed.
It’s a good way to get information on drivers, even ones that are outdated and not working.
With IPconfig we will contemplate the IP adress that we currently have associated with our computer.
You can use extensions like ipconfig / release followed by ipconfig / renew to get Windows to assign you a different IP address than the one you have. In addition, with ipcofig / flushdns you will be able to update your DNS address.
With Ping we know if the data packets reach our device or not.
If we write ping and then the IP address or web domain will send a series of test packages to the specified address to know if it works or not, since if it returns information everything will be fine, but if not, something will be causing the failure.
We can say that PathPing is a advanced version of ping command that we have seen before.
It is used by typing pathping followed by the IP address, working the same as ping except that this command transmits information about the route of the test packets.
Tracert is similar to pathping. The way to work is simple, like the previous ones, we write tracert followed by the IP address or the domain that you want to track.
The only difference with the above command is that tracert also track how long (in milliseconds) takes each hop between servers or devices.
Shutdown this is possibly one of the CMD commands most used by many users, since it serves to schedule computer shutdown.
If we want to make the PC turn off within a certain time we will write shutdown -s -t followed by seconds that have to elapse until the desired time is reached.
We can also use shutdown / r / oIf we want the computer to restart and see the Advanced Options menu, where we have Safe Mode.
System File Checker
System File Checker is a tool used for automatic scanning and repairing of Windows files.
For this command to work the CMD must be run as administrator to then put sfc / scannow. If it finds corrupt files, it will replace them with copies from the Windows cache.
Taskkill is used to force a program to stop. Can be used with taskkill -im followed by the name of the executable or taskkill -pid followed by the process ID.
It is a good way to get rid of hidden programs or those that do not respond. It is often used when in Windows there is no way to accomplish such a task.
Chkdsk is another of the commands most used by users, especially in another era, when DOS was more present, although with Windows it has been used a lot.
We have several options.
chkdsk c:, it will immediately scan the C drive, without the need to restart the computer. chkdsk / f, / r, / x, / BC:, this command fixes errors, recovers data, unmounts the drive or clear the list of bad sectors.
With Schtasks we can access the Task scheduler, but from the command prompt.
We will can set up multiple tasks similar without having to click on various options. For example, we can make a computer restart every day at 11 in the morning, something that can be really useful.
You can use this command to identify the text differences between two files.
File Compare is very useful, for example, for programmers who want to identify a difference between files that are extremely equal.
Command is fc and you can expand by writing / b to compare binary output, / c to ignore the case of the text and / l just compare ASCII text.
With Netstat you will be able get a list of ports that are open and the IP addresses that are related.
It can be a command that helps us in the event that we look for possible problems in devices that we have connected to our PC.
Powercfg is a command to track the computer’s power usage.
You can use the command powercfg hibernate on and powercfg hibernate off to manage hibernation, and the command powercfg / a to view power saving statuses.
The cls command is dedicated to cleaning up everything that appears on the screen.
That is, if we have used many commands before and we are with a screen full of information, if we put cls we get that everything disappears and we have the command prompt again as if we had just started it.
With these commands you will be able to get much more out of the Command Line (CMD), a part of Windows that is quite unknown.