The control prompt is slowly disappearing from the Windows interface and for good reasons: CMD commands are an antiquated and mostly unnecessary tool from an era of text-based input. Only many commands remain useful, and Windows eight and x fifty-fifty added new features.

Here nosotros nowadays the essential commands every Windows user must know.

Not sure how to access the Windows command prompt, forgot basic Windows commands, or would like to know how to see a listing of switches for each command (aka prompt codes)? Refer to our beginners guide to the Windows command line for instructions.

Windows Command Prompt Commands

If y'all haven't poked around inside Windows' command line, you're missing out. At that place are lots of handy tools you can use if you know the correct things to type.

1. Assoc

Screenshot of Windows command prompt with assoccommand.

Most files in Windows are associated with a specific program that is assigned to open the file by default. At times, remembering these associations can become confusing. You can remind yourself past entering the command assoc to display a full list of filename extensions and program associations.

You can also extend the control to change file associations. For example, assoc .txt= will modify the file association for text files to whatever program yous enter after the equal sign. The assoc control itself volition reveal both the extension names and program names, which will help you properly use this command.

In Windows 10, y'all tin view a more convenient interface that also lets you modify file blazon associations on the spot. Head to Settings (Windows + I) > Apps > Default apps > Choose default app past file type.

2. Nix

Cipher command in the Windows command prompt.

Deleting files on a mechanical hard bulldoze doesn't really delete them at all. Instead, information technology marks the files as no longer accessible and the space they took up as free. The files remain recoverable until the arrangement overwrites them with new data, which can take some fourth dimension.

The zilch control, however, wipes a directory past writing random data to it. To wipe your C drive, for example, yous'd use the cipher /westward:d command, which volition wipe free infinite on the drive. The command does not overwrite undeleted data, so you will not wipe out the files you lot need by running this command.

You tin use a host of other naught commands, however, they are generally redundant with BitLocker enabled versions of Windows.

3. Driverquery

Windows command prompt showing driverquery command.

Drivers remain among the most important software installed on a PC. Improperly configured, missing, or old drivers in Windows can cause all sorts of trouble, and so it's good to accept access to a listing of what's on your PC.

That's exactly what the driverquery command does. You tin extend it to driverquery -v to obtain more than data, including the directory in which the driver is installed.

four. File Compare

File compare command as seen in Windows command prompt.

You tin can utilise this command to place differences in text betwixt two files. It's particularly useful for writers and programmers trying to find small changes between two versions of a file. Just blazon fc and then the directory path and file name of the two files you want to compare.

You can also extend the command in several ways. Typing /b compares only binary output, /c disregards the case of text in the comparing, and /l only compares ASCII text.

So, for example, you could use the following:

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

The above control compares ASCII text in two Word documents.

5. Ipconfig

Ipconfig command in Windows command prompt window.

This command relays the IP address that your computer is currently using. Still, if you lot're backside a router (like virtually computers today), y'all'll instead receive the local network address of the router.

Withal, ipconfig is useful because of its extensions. ipconfig /release followed by ipconfig /renew tin force your Windows PC into request for a new IP address, which is useful if your figurer claims one isn't available. You can too use ipconfig /flushdns to refresh your DNS address. These commands are peachy if the Windows network troubleshooter chokes, which does happen on occasion.

Purchase Microsoft Windows for Your PC, Here

6. Netstat

Netstat command run on Windows.

Entering the command netstat -an will provide you with a list of currently open up ports and related IP addresses. This control will as well tell yous what state the port is in; listening, established, or closed.

This is a great control for when you're trying to troubleshoot devices connected to your PC or when yous fright a Trojan infected your system and you're trying to locate a malicious connectedness.

7. Ping

Ping command prompt window.

Sometimes, you need to know whether or not packets are making it to a specific networked device. That's where ping comes in handy.

Typing ping followed by an IP address or web domain volition send a series of test packets to the specified address. If they arrive and are returned, you know the device is capable of communicating with your PC; if it fails, you know that there's something blocking communication between the device and your reckoner. This can help you lot decide if the root of the upshot is an improper configuration or a failure of network hardware.

8. PathPing

Windows command prompt with PathPing command.

This is a more than advanced version of ping that's useful if there are multiple routers between your PC and the device y'all're testing. Similar ping, you use this command by typing pathping followed by the IP accost, but unlike ping, pathping as well relays some information nearly the route the examination packets have.

9. Tracert

Screenshot of Tracert command in Windows command prompt.

The tracert control is similar to pathping. In one case again, type tracert followed by the IP address or domain you'd like to trace. You'll receive information about each step in the route betwixt your PC and the target. Unlike pathping, nevertheless, tracert also tracks how much time (in milliseconds) each hop between servers or devices takes.

10. Powercfg

Powercfg command on Windows 10.

Powercfg is a very powerful control for managing and tracking how your computer uses energy. Y'all can use the command powercfg hide on and powercfg hide off to manage hibernation, and you lot can as well use the command powercfg /a to view the ability-saving states currently available on your PC.

Another useful command is powercfg /devicequery s1_supported, which displays a listing of devices on your computer that back up connected standby. When enabled, y'all can use these devices to bring your figurer out of standby, fifty-fifty remotely.

You can enable this past selecting the device in Device Managing director, opening its backdrop, going to the Power Management tab, and and then checking the Allow this device to wake the figurer box.

Powercfg /lastwake will show yous what device last woke your PC from a sleep state. You can use this command to troubleshoot your PC if information technology seems to wake from sleep at random.

Powercfg energy command in Administrator command prompt on Windows 10.

You lot can use the powercfg /energy command to build a detailed ability consumption study for your PC. The study saves to the directory indicated after the command finishes.

This study will let you lot know of whatsoever organization faults that might increase power consumption, similar devices blocking certain slumber modes, or poorly configured to reply to your power management settings.

Windows viii added powercfg /batteryreport, which provides a detailed analysis of battery use, if applicable. Ordinarily output to your Windows user directory, the report provides details about the time and length of accuse and discharge cycles, lifetime average battery life, and estimated battery capacity.

xi. Shutdown

Shutdown command on Windows 10.

Windows eight introduced the shutdown command that, you guessed it, shuts downwardly your figurer.

This is, of course, redundant with the already easily accessed shutdown push button, but what'southward not redundant is the shutdown /r /o command, which restarts your PC and launches the Advanced Outset Options menu, which is where you tin access Safe Manner and Windows recovery utilities. This is useful if you lot want to restart your figurer for troubleshooting purposes.

12. Systeminfo

Systeminfo command as seen on Windows 10.

This command volition give you a detailed configuration overview of your computer. The list covers your operating system and hardware. For instance, you can wait up the original Windows installation date, the terminal kick time, your BIOS version, total and available memory, installed hotfixes, network carte configurations, and more than.

Use systeminfo /southward followed by the hostname of a computer on your local network, to remotely take hold of the information for that system. This may require additional syntax elements for the domain, user proper noun, and password, like this:

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

13. System File Checker

System File Checker sfc command options available on Windows 10.

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

You will need to run the command prompt with administrator privileges and enter the command sfc /scannow. If SFC finds whatever corrupt or missing files, it volition automatically supervene upon them using buried copies kept by Windows for this purpose alone. The command can require a half-hr to run on older notebooks.

14. Tasklist

Tasklist command as shown in Windows command prompt window.

You lot tin apply the tasklist command to provide a electric current list of all tasks running on your PC. Though somewhat redundant with Job Manager, the control may sometimes detect tasks hidden from view in that utility.

There'southward as well a wide range of modifiers. Tasklist -svc shows services related to each task, use tasklist -five to obtain more detail on each job, and tasklist -chiliad will locate DLL files associated with active tasks. These commands are useful for advanced troubleshooting.

Our reader Eric noted that you tin can "become the name of the executable associated with the particular procedure ID y'all're interested in." The control for that performance is tasklist | find [process id].

xv. Taskkill

Taskkill command options available on Windows 10.

Tasks that announced in the tasklist command will have an executable and process ID (a four- or five-digit number) associated with them. You can force finish a programme using taskkill -im followed by the executable'due south name, or taskkill -pid followed by the process ID. Again, this is a bit redundant with Task Director, but you lot tin can use it to kill otherwise unresponsive or hidden programs.

16. Chkdsk

Running a chkdsk command to initiate a scan on Windows 10.

Windows automatically marks your drive for a diagnostic chkdsk scan when symptoms indicate that a local drive has bad sectors, lost clusters, or other logical or physical errors.

If yous doubtable your hard bulldoze is failing, you can manually initiate a scan. The most basic command is chkdsk c:, which volition immediately scan the C: bulldoze, without a need to restart the computer. If you add parameters similar /f, /r, /x, or /b, such as in chkdsk /f /r /x /b c:, chkdsk will as well fix errors, recover data, dismount the bulldoze, or clear the list of bad sectors, respectively. These actions require a reboot, equally they tin can only run with Windows powered downwardly.

If y'all see chkdsk run at startup, let information technology exercise its thing. If it gets stuck, notwithstanding, refer to our chkdsk troubleshooting article.

17. schtasks

Scheduling tasks using the Windows schtasks command prompt command.

Schtasks is your command prompt access to the Task Scheduler, one of many underrated Windows administrative tools. While you can use the GUI to manage your scheduled tasks, the command prompt lets y'all re-create&paste complex commands to prepare upwardly multiple similar tasks without having to click through various options. Ultimately, it'southward much easier to employ, once you've committed key parameters to memory.

For instance, y'all could schedule your estimator to reboot at 11pm every Friday:

          schtasks /create /sc weekly /d Fri /tn "auto reboot figurer weekly" /st 23:00 /tr "shutdown -r -f -t x"        

To complement your weekly reboot, you could schedule tasks to launch specific programs on startup:

          schtasks /create /sc onstart /tn "launch Chrome on startup" /tr "C:\Plan Files (x86)\Google\Chrome\Awarding\Chrome.exe"        

To duplicate the higher up command for different programs, just copy, paste, and change it as needed.

18. Format

Windows Command Prompt showing the format command with various parameters.

When you need to format a bulldoze, you lot can either use the Windows File Explorer GUI or you can plow to the control prompt. You'll need Ambassador rights to use this command. Be sure you specify the book y'all want to format, followed by the desired parameters.

The command beneath volition quick-format the D drive with the exFAT file system, with an resource allotment unit size of 2048 bytes, and rename the book to "characterization" (without the quotes).

          format D: /Q /FS:exFAT /A:2048 /5:characterization        

You can also utilise this control to dismount a volume (/X) or, if information technology's formatted with NTFS, make file compression the default setting (/R). If you're stuck, utilize format /? to summon help.

nineteen. prompt

The prompt command in action in the Windows command prompt.

Would you like to customize your control prompt to include instructions or sure data? With the prompt command, yous can!

Attempt this one:

          prompt Your wish is my command:                  

You can add the current time, date, drive and path, Windows version number, and then much more.

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

Blazon "prompt" to reset your command prompt to default settings or simply restart the command prompt. Unfortunately, these settings aren't permanent.

twenty. cls

Cluttered upwardly your command prompt window trying out all the commands above? There's one final command you demand to know to clean it all up again.

          cls        

That's all. Bet Marie Kondo didn't know that ane.

Windows 8 Only: Recovery Image

Virtually all Windows viii/8.1 computers ship from the factory with a recovery prototype, but the paradigm may include bloatware you lot'd rather not take re-installed. One time y'all've uninstalled the software you lot can create a new image using the recimg command. Entering this command presents a very detailed explanation of how to utilize it.

You lot must accept administrator privileges to use the recimg control, and you tin only access the custom recovery image you create via the Windows 8 refresh characteristic.

In Windows 10, system recovery has inverse. Windows x systems don't come up with a recovery partition, which makes it more important than ever to back up your data.

Control and Conquer Your Windows PC

This article can but give y'all a taste of what's subconscious inside the Windows command line. When including all variables, there are literally hundreds of commands. Download Microsoft's command line reference guide (in Edge or Internet Explorer) for advanced back up and troubleshooting.

We hope you lot like the items we recommend and discuss! MUO has affiliate and sponsored partnerships, so we receive a share of the revenue from some of your purchases. This won't affect the toll yous pay and helps us offer the all-time product recommendations.

How to Use the New Windows Terminal for Your Productivity

Read Side by side

About The Author