15 common Command Prompt commands you should know on your computer.

This compilation of 15 Command Prompt (CMD) commands on your computer will help you perform various tasks such as checking your network IP address, checking your internet connection speed, automatically shutting down your computer, and more. Follow the detailed CMD commands below to apply them to your daily work.

Microsoft has slowly but surely pushed the command line aside in the Windows interface. This is not without reason, as it is an outdated tool and largely unnecessary from a time when command-line input was done via text.

Picture 1 of 15 common Command Prompt commands you should know on your computer.

However, many commands are still useful today, and even Windows 8 and Windows 10 have added new features. Therefore, today, Taimienphi will introduce you to 15 popular Command Prompt commands you should know. All of them will be in the following article.

Here are 15 common Command Prompt commands you should know.

1. Ipconfig

This command forwards the IP address your computer is currently using. However, if your device is connected to a router (like most computers these days), you will receive the router's internal network address.

Picture 2 of 15 common Command Prompt commands you should know on your computer.

However, ipconfig can be useful with extensions. " ipconfig /Release " and " ipconfig /renew " can force your device to search for a new IP address, which is helpful if your computer doesn't have an IP address available. You can also use " ipconfig /flushdns " to refresh your DNS address.

2. Netstat

Entering the command "netstat -an" will give you a list of open ports and their associated IP addresses.

Picture 3 of 15 common Command Prompt commands you should know on your computer.

This is a very useful command when you're trying to troubleshoot devices connected to your computer or when you're worried about a Trojan infecting your system and you're trying to locate a malicious connection.

3. Ping

Picture 4 of 15 common Command Prompt commands you should know on your computer.

Ping (Packet Internet Groper) is used to check if two devices on a network can connect to each other. Ping is also used to measure packet latency on a network. Most operating systems, such as Linux and Windows, support the ping command.

4. PathPing

Picture 5 of 15 common Command Prompt commands you should know on your computer.

This is a more advanced version of ping, useful if you have multiple routers between your computer and the devices you're testing. Like ping, you use this command by typing " pathping " followed by the IP address, but unlike ping, pathping also forwards some information about the routes the test packets are taking.

5. Tracert

Picture 6 of 15 common Command Prompt commands you should know on your computer.

The " tracert " command is similar to pathping . When you type " tracert " followed by the IP address or domain name you want to access in CMD, you will receive information about each step in the path between your computer and the target. Unlike pathping, tracert also tracks how much time (in milliseconds) elapses between servers or devices.

6. Shutdown

Just like on Windows 8/8.1, you will have a command to shut down your computer.

Picture 7 of 15 common Command Prompt commands you should know on your computer.

This is, of course, a backup option with the shutdown button; what we have is the command " shutdown /r /o ", which restarts your computer and launches the advanced start menu, where you can access Safe Mode and the recovery utility window. This command is quite useful if you want to restart your computer for troubleshooting purposes.

7. System File Checker

System File Checker is an automated scanning and repair tool that focuses on Windows system files.

Picture 8 of 15 common Command Prompt commands you should know on your computer.

You will need to run Command Prompt with administrator privileges and enter the command " sfc /scannow ". If SFC finds any corrupted or missing files, it will automatically replace them using a Windows backup for this purpose. CMD commands can take quite a while to execute on older laptops.

8. Tasklist

You can use the `tasklist` command to ask the system to display a list of all currently running programs on your computer. While this might seem redundant since we already have Task Manager, sometimes this CMD command allows us to see hidden running tasks.

Picture 9 of 15 common Command Prompt commands you should know on your computer.

It also includes a range of tweaking tools. "Tasklist -svc" shows the services associated with each job, using "tasklist -v" gets details about each task, and "tasklist -m" will find the .dll file associated with the active task. These CMD commands are useful for advanced troubleshooting.

9. Taskkill

Picture 10 of 15 common Command Prompt commands you should know on your computer.

Tasks appearing in the "tasklist" command will have an executable file and a process ID (a four-digit number) associated with them. You can force stop a program by using "taskkill -im" followed by the name of the executable file, or "taskkill -pid" followed by your process. Again, this command seems a bit redundant when we already have everything in Task Manager, but you can use it to terminate an unresponsive or hidden program.

10. DriverQuery

Picture 11 of 15 common Command Prompt commands you should know on your computer.

Drivers remain the most important software installed on a computer. Incorrect configuration or the absence of drivers can cause all sorts of problems, so it's essential to obtain a list of computer access configurations, which is what the "driverquery " command does . You can also view the extended list using the " driverquery -v " command to get more information, including the directories where drivers are installed.

11. File Compare

You can use this command to identify differences between two text files. It's especially useful for writers and programmers trying to find subtle changes between two versions of a file. Just type " fc " followed by the directory path and filenames of the two files you want to compare.

Picture 12 of 15 common Command Prompt commands you should know on your computer.

You can also extend CMD commands in several ways. Type " /b " to compare binary-only output, " /c " disregards the case of the text in comparison, and " /l " compares only text in ASCII character encoding.

12. Powercfg

Powercfg is a very powerful command used to manage and monitor how your computer uses energy. You can use the commands " powercfg /hibernate on " and " powercfg /hibernate off " to manage hibernation, and you can also use the command " powercfg /a " to see if power savers are currently available on your computer.

Another useful command is " powercfg /devicequery s1_supported ", which displays a list of devices on your computer that support standby. When enabled, you can use these devices to bring your computer out of standby mode, even remotely. You can enable this feature by selecting the devices in Device Manager , opening their properties, going to the Power Management tab , and then checking the "Allow this device to wake the computer" box.

Picture 13 of 15 common Command Prompt commands you should know on your computer.

The command " Powercfg /lastwake " will show you what device last woke your computer from sleep mode. You can use this command to troubleshoot your computer if it wakes up from sleep randomly.

You can use the command " powercfg /energy " to build a detailed power consumption report for your computer. This report will be saved to the specified directory after the command finishes. The report will tell you about any system errors that might increase power consumption, such as devices blocking certain sleep modes, or configurations that are poorly responsive to your power management settings.

On Windows 8, the command " powercfg /batteryreport " provides a detailed analysis of battery usage, if applicable. The report provides details on the time and length of charge and discharge cycles, average battery life, and estimated battery capacity.

13. Recovery Image (Windows 8)

Almost all Windows 8/8.1 computers come with a recovery image file, but that image may contain bloatware that you don't want to reinstall. Once you skip installing the software, you can create a new image file using the " recigg " command.

Picture 14 of 15 common Command Prompt commands you should know on your computer.

You need administrator privileges to use the `recimg` command , and you can only access the customizations of the image files you create through the `Refresh` feature on Windows 8.

On Windows 10, system recovery has changed. Windows 10 systems don't come with a recovery partition, making it more important than ever to create a recovery drive.

14. ASSOC.

Most files in Windows are associated with a specific program assigned to open them by default. Sometimes, remembering the combinations can become confusing. You can remind yourself by typing the command " PGS " to display a complete list of file name extensions and associated programs.

Picture 15 of 15 common Command Prompt commands you should know on your computer.

You can also extend the commands to change file associations. For example, " assoc.txt= " will change the file association for text files so that whatever program you type after the equals sign is correct. The PGS command will reveal the file extension and program name, which will help you use this command correctly. You can more easily do this in a GUI, but a command-line interface is a perfect alternative to this functionality.

15. Cipher.

Deleting files on a hard drive is simple, but they aren't actually erased. Instead, it marks them as inaccessible and free space. The files can still be recovered until the system overwrites them with new data, which can take some time.

Picture 16 of 15 common Command Prompt commands you should know on your computer.

However, deleting a directory by writing random data to it is not possible. To clean up your C drive, for example, you would use the command "cipher /w:c", which will scan for free space on the drive. The CMD command does not overwrite but completely deletes the data, so you won't need to wipe the files you need by running this command.

Above is a compilation of 15 popular Command Prompt commands that Taimienphi wants to introduce to you. If there are any errors or additions, please feel free to comment below so we can update it together.


Furthermore, the CMD command is very useful because it allows us to do many things without needing third-party software. For example, the guide on hiding hard drive partitions using CMD, introduced in a previous article, is quite helpful for those who need privacy on their computers.


« PREV POST
READ NEXT »