29 C
Texas

12 useful commands for the Command Prompt

Hello! Windows is certainly the most popular desktop operating system. Indeed, ease of use has always been its hallmark. In this context, its graphical interface contributes a lot to this task. Indeed, the windowed organization is straightforward to maintain. This makes users very accustomed to the graphical environment. However, the system also has its command line tools. We are talking about the command prompt and PowerShell. To be honest, this element is very unknown and undervalued within the operating system. That is why today we will see 12 useful commands for the Command Prompt.

Some useful commands for the command prompt.

Certainly, many users have never used the command prompt. On the contrary, in the past this tool had a lot of relevance. Indeed, most of the tasks were done by text. However, there are several commands for CMD that are very fascinating. Moreover, they work for Windows 10 and Windows 11 as well. As we said, these commands are intended for the command prompt. To access them, just type CMD in the search bar and then launch it.

Opening a Command Prompt
Opening a Command Prompt

Assoc

The vast majority of Windows files are associated with a program which is in charge of opening them. Well, with Assoc we will be able to see all these associations to remember them. The command displays a list of file extensions. In addition to the program associated with each of them. We will even have the opportunity to change some association. Let’s suppose we want to change the association of .txt files. Therefore, we type assoc .txt=. After the = sign you must type the program to open it.

Driverquery

This command displays all the controllers that are on the computer. We can extend it with driverquery -v to get additional information. This includes the directory in which the driver is installed. As you can see, this is a great way to get information about the drivers. Consequently, we will be able to find out about those outdated ones that do not work.

Ipconfig

- Advertisement -

ipconfig displays the IP address currently associated with the computer. It also has several interesting extensions. For example, we can generate a new IP address different from the one we are using. With this in mind, we will use ipconfig /release followed by ipconfig /renew. Furthermore, with ipcofig /flushdns you can update your DNS address.

Ping

With ping, we can determine whether data packets are reaching our device. Just type ping followed by the IP address or web domain. As a result, a series of test packets will be sent to the specified address, which will determine whether it works or not. Indeed, if it returns information everything will be fine, but if not, something is causing the failure.

PathPing

We can say that PathPing is an advanced version of the ping command we have seen before. It is used in the same way as the previous command. That is, you just have to type PathPing followed by the IP address or web domain. The difference is that this command transmits information about the path of the test packets.

Tracert

Tracert is also a command related to package reception. Therefore, it works similar to pathping. Even the syntax is the same. Just type Tracert followed by the IP address or web domain. The difference is that tracert also tracks how long (in milliseconds) each hop between servers or devices takes.

Shutdown

Shutdown is possibly one of the most used CMD commands by many users. In fact, this command allows you to schedule the shutdown of the computer. To schedule the shutdown of the computer, just type shutdown -s -t followed by the seconds that have to elapse until the desired time is reached. Another interesting option is to be able to restart the computer by displaying the advanced options menu. With this in mind, just use: shutdown /r /o. You can learn more about this command in this tutorial.

System File Checker

System File Checker is a tool used for automatic scanning and repairing of Windows files. Commonly called SFC, it needs to be run in CMD with administrator privileges. One of its variants is sfc/scannow. In this way, it will search for corrupted files and replace them with copies from the Windows cache. To learn more about this command, please have a look at this tutorial.

Taskkill

Taskkill is used to force a program to stop. For example, we can use taskkill -im followed by the executable name or taskkill -pid followed by the process ID. This is a good way to get rid of hidden or unresponsive programs. It works as a last resort, when the graphical interface is not functional for the task.

Chkdsk

Chkdsk is also one of the most frequently used commands by users. Especially in earlier times, when DOS was more present. However, with Windows, its use is still prevalent. Some of its variables are:

  • chkdsk c : will immediately scan the C drive, without the need to restart the computer.
  • chkdsk / f, / r, / x, / BC: this command corrects errors, recovers data, unmounts the drive or clears the list of bad sectors.

However, you can learn more about this command by reading this tutorial.

Schtasks

With Schtasks we will be able to access the Task Scheduler, but from the command prompt. Consequently, we will be able to configure multiple similar tasks without having to click on several options. An example is to be able to schedule the computer to restart every day at a certain time.

File Compare

This command is used to identify text differences between two files. It is certainly quite useful, especially for programmers. For example, if they want to identify a difference between files that are extremely similar. The command is fc, and you can extend it by typing /b to compare binary output, /c to ignore the text case and /l only compares ASCII text.

Ultimately, we have seen 12 useful commands for the command prompt. As you can see, they can get us out of trouble more than once. Moreover, you just have to dig deeper into each one to get the best out of it. See you soon!

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article