Most useful CMD Commands

Most useful Windows Command Prompt (CMD) Commands You Must Know

The command prompt is the Windows effective software. Listed here are the most useful CMD Commands each consumer should know.

The command prompt is disappearing from Windows and for good causes. CMD commands are an antiquated and pointless tool from a period of text-based enter. But many instructions stay helpful, and Windows Eight and 10 even added new options.

Right here we present the most useful CMD Commands each Windows consumer should know.

Unsure methods to enter the Windows command prompt forgot fundamental Windows commands. Or wish to know to learn how to see a listing of switches for every command (aka prompt codes)? Consult with our newbie’s information to the Windows command line for instructions.

Windows Command Prompt Commands

Most useful CMD Commands

If you have not poked around inside Windows’ command line, you are lacking out. There are many helpful instruments you need to use if you already know the proper things to sort.

1. Ipconfig

This command relays the IP handle that your laptop is at present utilizing. Still, if you happen to be behind a router (like most computer systems right now). You may as an alternative get the local network handle of the router.

Still, ipconfig is helpful due to its extensions. ipconfig /release followed by ipconfig /renew can power your Windows PC into asking for a brand new IP address. This is helpful in case your laptop claims one is not obtainable. You can too use ipconfig /flushdns to refresh your DNS handle. These instructions are nice if the Windows community troubleshooter chokes, which does occur once in a while.

2. Cipher

Deleting files on a mechanical hard drive would not actually delete them in any respect. As a substitute, it marks the files as now not accessible and the area they took up as free. The files stay recoverable till the system overwrites them with new knowledge, which might take a while.

The cipher command, nonetheless, wipes a listing by writing random knowledge to it. To wipe your C drive, for instance, you’d use the cipher /w:d command, which can wipe the free space on the drive. The command doesn’t overwrite undeleted knowledge, so you’ll not wipe out the files you want by operating this command.

3. Tasklist

You need to use the tasklist command to offer a present listing of all tasks operating on your PC. Although redundant with the Task Manager, the command could generally discover tasks hidden from view in that utility.

There’s additionally a variety of modifiers. Tasklist -svc exhibits companies associated with every job, use tasklist -v to get the extra element on every job. And tasklist -m will find DLL files related to lively duties. These instructions are helpful for superior troubleshooting.

Our reader Eric famous which you can “get the title of the executable related to the actual course of ID you fascinates about.” The command for that operation is tasklist |find[process id].

4. File Compare

You need to use this command to establish variations in textual content between two files. It is helpful for writers and programmers looking for small adjustments between two variations of a file. Sort fc after which the listing path and file title of the 2 files you need to test.

You can even extend the command in many methods. Typing /b compares only binary output, /c disregards the case of textual content within the comparability. And /l only compares ASCII textual content.

So, for instance, you can use the following:

fc /l “C:\Program Files (x86)\example1.doc” “C:\Program Files (x86)\example2.doc”

The above command compares ASCII text in two Word documents.

5. Assoc

Most useful CMD Commands

Most files in Windows relate to a selected program that’s assigned to open the file by default. At instances, remembering these associations can grow to complicate. You’ll be able to remind yourself by getting into the command assoc to show a full listing of filename extensions and program associations.

You can too prolong the command to alter file associations. For instance, assoc .txt= will change the file affiliation for textual content files to no matter program you enter after the equal signal. The assoc command itself will reveal each of the extension names and program names. This can aid you in using this command.

In Windows 10, you’ll be able to view an extra interface that additionally helps you to change file sort associations on the spot. Head to Settings (Windows+ I) > Apps > Default apps >Selectdefault app by filesort.

6. Netstat

Getting into the command netstat -an will offer you a listing of at present open ports and associated IP addresses. This command will even inform you what state the port is in; listening, established, or closed.

This can be a nice command for while you’re making an attempt to troubleshoot devices linked to your PC. Or while you worry a Trojan contaminated your system and also you’re making an attempt to find a malicious connection.

7. Ping

You must know whether packets are making it to a selected networked machine. That is the place ping is useful.

Typing ping followed by an IP address or web domain will send a collection of check packets to the desired address. In the event that they arrive and return, you already know the machine is able to speak along with your PC. If it fails, you already know that there is one thing blocking communication between the machine and your laptop. This might help you determine if the root of the problem is an improper configuration or a failure of network {hardware}.

8. PathPing

This can be an extra superior version of ping that is helpful if there are many routers between your PC and the device you are testing. Like ping, you use this command by typing pathping followed by the IP address. But not like ping, pathping additionally relays some details about the route the check packets take.

9. Tracert

The tracert command is like pathping. As soon as once more, sort tracert followed by the IP handle or area you’d wish to hint. You may get details about every step within the route between your PC and the goal. Not like pathping, nonetheless, tracert additionally tracks how a lot of time (in milliseconds) every hop between servers or devices takes.

10. Powercfg

Powercfg is an effective command for managing and monitoring how your laptop makes use of power. You need to use the command powercfg hibernate on and powercfg hibernate off to handle hibernation. And you may also use the command powercfg /a to view the power-saving states at present obtainable in your PC.

One other helpful command is powercfg /devicequery s1_supported. This shows a listing of gadgets in your laptop that support connected standby. When enabled, you need to use these devices to convey your laptop out of standby.

You’ll be able to allow this by deciding on the device in Device Manager. Opening its properties, going to the Power Management tab. After which checking the Allow this device to wake the computer box.

Powercfg /lastwake will present to you what device finally woke your PC from a sleep state. You need to use this command to troubleshoot your PC if it appears to wake from sleep at random.

You need to use the powercfg /energy command to construct an in-depth energy consumption report on your PC. The report saves to the listing indicated after the command finishes.

This report will let you already know of any system defects which may improve energy consumption. Like devices blocking sure sleep modes or configured to answer your power management settings.

Windows Eight added powercfg /batteryreport, which offers an in-depth evaluation of battery use, if relevant. Usually, output to your Windows consumer listing. The report offers details about the time and size of cost and discharge cycles. Lifetime common battery life, and estimated battery capability.

11. Shutdown

Windows 8 launched the shutdown command that you guessed it, shuts down your laptop.

That is, after all, redundant with the already accessed shutdown button. But, what’s not redundant is the shutdown /r /o command, which restarts your PC. And launches the Advanced Start Choices menu. This is the place you’ll be able to enter Protected Mode and Windows restoration utilities. That is helpful if you wish to restart your laptop for troubleshooting functions.

12. Systeminfo

This command will provide you with a detailed configuration overview of your laptop. The listing covers your working system and {hardware}. For instance, you’ll be able to search for the unique Windows installation. The final boot time, your BIOS model, complete and obtainable memory, installed hotfixes, network card configurations, and more.

Use systeminfo /s followed by the hostname of a pc in your native community, to seize the information for that system. This will likely must extra syntax components for the area, consumer title, and password, like this:

systeminfo /s [host_name] /u [domain]\[user_name] /p [user_password]

13. System File Checker

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

You’ll need to run the command immediately with administrator privileges and enter the command sfc /scannow. If SFC finds any corrupt or lacking files. It’ll change them utilizing cached copies saved by Windows for this function alone. The command can be a half-hour to run on older notebooks.

14. Driverquery

Drivers stay among the many most essential software program put in on a PC. Improperly configured, lacking, or old drivers in Windows could cause all kinds of hassle. So it is good to have entry to a listing of what is on your PC.

That is what the driverquery command does. You’ll be able to prolong it to driverquery -v to get extra data. Together with the listing by which the driving force puts in.

15. Taskkill

Duties that seem within the tasklist command can have an executable and process ID (a four- or five-digit quantity) related to them. You’ll be able to force stop a program utilizing taskkill -im adopted by the executable’s title or taskkill -pid followed by the method ID. Once more, this can be a bit redundant with the Task Manager. But, you need to use it to kill in any other case unresponsive or hidden programs.

16. Chkdsk

Windows mark your drive for a diagnostic chkdsk scan when signs point out that a local drive has bad sectors, lost clusters, or different logical or physical errors.

Should you suspect your hard drive is failing, you’ll be able to provoke a scan. the most basic command is chkdsk c: which can scan the C: drive, with no, must restart the pc. Should you add parameters like /f, /r, /x, or /b, corresponding to in (chkdsk /f /r /x /b c: chkdsk) will even repair errors, recover data, dismount the drive, or clear the record of bad sectors. These actions must be a reboot, as they’ll only run with Windows-powered down.

17. schtasks

schtasks is your command prompt access to the Task Scheduler. One among many underrated Windows administrative tools. Whereas you need to use the GUI to handle your scheduled tasks. The command prompt helps you to copy&paste advanced commands to arrange many similar tasks without having to click on varied options. In the end, it is a lot simpler to make use of, as soon as you’ve got dedicated key parameters to memory.

For instance, you can schedule your laptop to reboot at 11 pm each Friday:

schtasks /create /sc weekly /d FRI /tn “auto-reboot computer weekly” /st 23:00 /tr “shutdown -r -f -t 10”

To enrich your weekly reboot, you can schedule duties to launch particular packages on startup:

schtasks /create /sc onstart /tn “launch Chrome on startup” /tr “C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe”

To duplicate the above command for various packages, copy-paste, and change it as wanted.

18. Format

When that you must format a drive, you’ll be able to both use the Windows File Explorer GUI or you’ll be able to turn to the command prompt. You may want Administrator rights to make use of this command. Be certain you specify the amount you need to format, followed by the specified parameters.

The command under will quick-format the D drive with the exFAT file system. With an allocation unit measurement of 2048 bytes, and rename the amount to “label” (without the quotes).

format D: /Q /FS:exFAT /A:2048 /V:label

You may also use this command to dismount a volume (/X) or, if it formats with NTFS, make file compression the default setting (/R). When you’re stuck, use format /? to summon help.

19. prompt

Would you wish to customize your command prompt to include instructions or certain information? With the prompt command, you’ll be able to!

Do this one:

prompt Your wish is my command:

You’ll be able to add the present time, date, drive and path, Windows model quantity, and a lot extra.

prompt $t on $d at $p using $v:

Sort “prompt” to reset your command prompt to default settings or restart the command prompt. Unfortunately, these settings aren’t everlasting.

20. cls

Have you ever Turned off your command prompt window by attempting all the above instructions.? There’s the final command that you must know to wash all it up once more.


Awais is a freelancer, creative writer, and also SEO Expert. He has good experience in writing news articles. Additionally, he is also a researcher of Blogging, SEO, Social Media, premium accounts tips and tricks, etc