To the average Windows user, DOS commands seem like a holdover from their time. However, they still exist and are as useful as they were many years ago.
To fully appreciate how powerful these commands are, we’ve compiled a list of the most useful DOS commands Of course, some of them are not entirely useful on a typical day. But when you really need them, DOS commands will help you.
How to use DOS commands
First things first. How do you use DOS commands?
You have to open Command Prompt or PowerShell. Both programs come with Windows and are available through Windows Search.
Some commands require you to open any of the programs as an administrator. To do this, right-click the application and select “Run as administrator”. In the following examples, we will be using Windows Powershell.
Useful command prompts for Windows
From basic troubleshooting to network configuration, there are commands that will get your computer back to normal.
– /
IPCONFIG
Let’s start simple.
The IPCONFIG command allows you to determine your IP address. The need to know your IP address often arises when setting up a network or when having problems with the Internet.
Although the IP addresses can be found through the control panel, the command line is a faster way to get this information.
Enter IPCONFIG at the command line. Find the default gateway. The number assigned to it is your IP address.
IPCONFIG / FLUSHDNS
There comes a time when you have problems accessing the site. When this happens, the first thing you can try is flushing the DNS.
This will allow your browser to reconnect to the regular version of the website, rather than the unstable version it is currently accessing.
Enter IPCONFIG / FLUSHDNS at the command line and press Enter to execute. You will receive a notification if the cleanup was successful.
ASSOC
If you ever need a list of all applications that can open a particular file type, ASSOC can help with that.
Note: you will need to run ASSOC using the command line. This doesn’t work in PowerShell.
Enter ASSOC followed by the filename extension. Windows will then tell you which applications can work with the extension.
PING
The ping command allows you to connect to a website to see how long it will take to receive a packet (data sent over the network).
If the target website is not receiving these packages, it only means there is a problem with your connection. This is an easy way to diagnose a network problem.
Enter PING at the command line. You will be shown how long it took for these packages to be sent.
CIPHER
If you are not using a solid state drive (SSD), you can erase the contents of the hard drive using the CIPHER command line.
It works by dumping unnecessary files onto your disk until it runs out of free space. Thus, deleted files cannot be recovered.
Essentially, CIPHER will clean up the drive.
Enter CIPHER / W: followed by the drive you want to clean up. It should look like CIPHER / W: E: (if you are wiping drive E: ).
SFC / SCANNOW
When your computer crashes, SCANNOW can figure out what’s going on with your computer.
Therefore, before taking your computer for repair, you need to first scan it to rule out missing or damaged files as the culprit.
Enter SFC / SCANNOW and wait for the system scan verification phase to complete.
Note. Windows automatically uses Windows Resource Protection to repair corrupted files if they are found.
Conclusion
There are other command lines that were not included. Some are more complex, but equally useful.
As a last resort, these helpful DOS commands come in handy, so be sure to keep the list handy in case of an emergency.
–