Useful Windows CMD Commands That Every User Should Know

Picture this. It is 2 AM, and you are frantically trying to finish a massive project. Out of nowhere, your computer screen freezes. The mouse will not move, Ctrl+Alt-Delete is doing absolutely nothing, and panic starts to set in.

Most people would just yank the power cord out of the wall and pray their auto-save worked. But if you know your way around the Windows Command Prompt, you possess a digital superpower that can save your PC from the brink of disaster.

Honestly, the Command Prompt (CMD) gets a terrible reputation. Casual users accidentally open it, see a menacing black window with flashing white text, and immediately close it, terrified they just hacked into the Pentagon. But underneath the sleek graphical interface of Windows 11 lies a text-based engine that skips the bloat, bypasses the glitchy menus, and gives you raw, direct control over your machine.

Useful Windows CMD Commands That Every User Should Know

Let's dive in. I am going to walk you through the absolute best Windows CMD commands that every user should know. We are skipping the useless fluff and focusing on the essential CMD commands that actually fix problems, speed up your workflow, and make you feel like an absolute tech wizard.

By the way, before you start typing, you need to open CMD correctly. Just clicking on it is not enough. You have to press your Windows key, type cmd, right-click on "Command Prompt," and select Run as administrator. If you skip this step, Windows will block half of these commands with an annoying "Access Denied" error.

Alright, let us get our hands dirty.

When your computer starts acting like a glitchy mess - throwing random Blue Screens of Death (BSOD) or refusing to open basic applications - you do not need to take it to a repair shop right away. You just need to run the built-in digital paramedics.

1. SFC /SCANNOW (System File Checker)

This is arguably the most famous command line trick in existence, and for good reason. The System File Checker scans the core foundation of your Windows operating system for corrupted or missing files, and then automatically replaces them with a healthy cached copy.

Think of it like a building inspector who not only finds the rotting wood in your house but instantly replaces it with fresh timber.

To Use it, Open CMD as an administrator and type:

sfc /scannow

Hit Enter and go grab a cup of coffee. It usually takes about 10 to 15 minutes to run. Do not close the window until it reaches 100%. If it finds errors, it will proudly display, "Windows Resource Protection found corrupt files and successfully repaired them." A quick restart later, and your PC will likely run like it is brand new.

2. CHKDSK (Check Disk)

If sfc checks your software files, chkdsk checks your actual physical hard drive. Over time, storage drives develop "bad sectors"—tiny physical or logical errors that cause your files to load at a glacial pace.

To scan your primary C: drive, fix any logical errors, and recover readable information from bad sectors, type:

chkdsk C: /f /r

Because your C: drive is currently in use running Windows, CMD will politely ask if you want to schedule this scan for the next time you restart your computer. Type Y, hit Enter, and restart your PC. Be warned: this process can take an hour or more depending on the size of your hard drive, so do not do this right before a Zoom meeting.

There is nothing more infuriating than looking at the bottom right corner of your screen, seeing full Wi-Fi bars, but getting a "No Internet Connection" error in your browser. When the standard Windows troubleshooter unhelpfully suggests you "turn your router off and on again," these network diagnostics commands will actually solve the issue.

Also Read: Best Chrome Flags to Improve Browsing Speed and Experience (PC and Android)

3. IPCONFIG /FLUSHDNS

Your computer keeps a hidden address book called a DNS cache. It remembers exactly where websites live so it can load them faster the next time you visit. But if a website changes its server, or your cache gets corrupted, your computer keeps driving to the wrong address, resulting in a blank page.

To use Type the following command and hit Enter:

ipconfig /flushdns

This instantly shreds the old digital address book, forcing your computer to ask for the fresh, correct directions. It takes one second, gives you a satisfying "Successfully flushed the DNS Resolver Cache" message, and fixes a shocking amount of internet routing problems. To see all your current network details, you can also use ipconfig /all.

4. PING

Is your internet actually down, or is Netflix just having a bad day? The ping command is the fastest way to find out. It sends a tiny packet of data to a specific website and measures exactly how many milliseconds it takes for the website to reply.

To use it, Type:

ping google.com

If you see a series of replies with a time in milliseconds (e.g., time=14ms), your internet is working perfectly fine. If you see "Request timed out," your internet is completely dead.

Also Read: How to Safely Debloat Windows 11 in 2026 (Without Breaking Updates)

5. TRACERT (Trace Route)

If your online game is lagging horribly, tracert is the ultimate detective tool. It tracks the exact path your data takes, hopping from your router to your Internet Service Provider, and finally to the destination server.

To use it, Type:

tracert google.com

It will list every single "hop" along the way. If the first hop (your router) takes 200 milliseconds, you know the problem is inside your own house. If hop number five takes 500 milliseconds, you know your internet provider is dropping the ball somewhere in the city.

We have all been there. A heavy program completely freezes, locking up your entire screen. You try to open the standard Task Manager (Ctrl+Shift+Esc), but the system is so bogged down that the Task Manager window refuses to open. You are stuck.

This is where the Windows 11 CMD becomes an absolute lifesaver.

6. TASKLIST

This is essentially a text-based version of the Task Manager. It displays a comprehensive list of every single process currently running on your computer, along with its exact memory usage and Process ID (PID).

To use it, Type:

tasklist

You will get a long list of programs. Scroll through until you find the name of the app that is holding your computer hostage (for example, chrome.exe or premiere.exe).

7. TASKKILL

Once you have identified the rogue application, it is time to bring out the digital sniper rifle. The taskkill command forcibly ends running processes, completely bypassing the frozen graphical interface.

To brutally force a program to close by its image name, type:

taskkill /F /IM chrome.exe

Let us break that down so you do not get half the info. The /F stands for "Force" (meaning it will not ask the program nicely to save and close; it will execute it immediately), and the /IM stands for "Image Name," which is the exact name of the file you saw in the task list. This is an incredibly satisfying way to regain control of a locked-up machine.

Have you ever tried to buy a new stick of RAM or check if your PC supports a specific software update, only to realize you have no idea what motherboard or exact Windows build you are running? Digging through the modern Windows 11 settings menus to find this information is a nightmare.

Also Read: Public vs. Private IP Addresses: What's the Real Difference?

8. SYSTEMINFO

This command acts as a comprehensive X-ray for your computer. It bypasses the messy menus and instantly generates an incredibly detailed readout of your exact hardware and software specifications.

To use it, Type:

systeminfo

Wait a few seconds for it to compile, and you will see everything. It shows your original Windows installation date, your system boot time, the exact version of your BIOS, your processor architecture, and every single network card installed in your rig. It is the ultimate Windows command prompt cheat sheet for hardware specs.

9. POWERCFG /BATTERYREPORT

If you own a laptop, this is hands down the coolest trick on this list. Lithium-ion batteries degrade over time, losing their capacity to hold a full charge. Windows secretly tracks this degradation, but it does not show you the data anywhere in the normal battery settings.

To use it, Type:

powercfg /batteryreport

CMD will generate a highly detailed HTML file and tell you exactly where it saved it (usually in C:\Windows\System32\battery-report.html if ran as admin, or in your C:\Users\[YourName] folder).

Navigate to that folder and double-click the file to open it in your web browser. You will see a beautiful layout detailing your battery's "Design Capacity" (what it held out of the factory) versus its "Full Charge Capacity" (what it holds today). It even shows your total cycle count. It is incredibly insightful, especially if you are wondering if it is time to buy a replacement battery.

Power-User File Management & Privacy

Dragging and dropping files works fine if you are moving a few Word documents. But if you are trying to back up 500 gigabytes of family videos to an external hard drive, the standard Windows Explorer is a nightmare. It will inevitably crash at 99%, fail to copy hidden files, and leave you wondering what actually transferred.

10. ROBOCOPY (Robust File Copy)

This command is a heavily guarded secret among IT professionals. It is a powerful, advanced copying tool built directly into CMD that is designed to handle massive data transfers without failing. It handles interruptions perfectly, meaning if your network drops or your USB cable wiggles, it will pause and resume rather than canceling the entire transfer.

Let us say you want to mirror your entire "Photos" folder on your C: drive to your external D: drive backup. You would type:

robocopy C:\Users\YourName\Pictures D:\Backup /MIR

The /MIR tag tells Robocopy to "mirror" the directory. It will copy everything, including subfolders, and if you run the command again next week, it will save massive amounts of time by only copying the new photos you added since the last backup.

11. CIPHER (The Privacy Guard)

Here is a slightly terrifying fact: when you right-click a file and hit "Delete," and then empty your recycle bin, the file is not actually gone. Windows simply marks that space on your hard drive as "available," but the raw data sits there completely intact until another file writes over it. Anyone with a basic recovery tool can pull up your deleted tax returns or personal photos.

If you are planning to sell or donate an old PC, the cipher command is your best friend. Originally designed to manage encryption, it has a brilliant secondary function: it securely wipes all the empty space on your hard drive by overwriting it with random data.

To securely wipe the deleted files on your C: drive, close all your running apps and type:

cipher /w:C:\

This process can take a very long time depending on the size of your drive and the speed of your processor. I highly recommend running it overnight. Once it finishes, your deleted files are permanently, irretrievably destroyed.

The Navigation Basics (Because You Should Not Get Lost)

I would be doing you a disservice if I gave you all these advanced tools without teaching you how to walk around the Command Prompt properly. Navigating CMD is incredibly simple once you know the basic directory commands.

  • DIR (Directory): If you open CMD and have no idea what folder you are currently looking at, type 'dir' and hit Enter. It will list every single file and subfolder in your current location.
  • CD (Change Directory): Want to move into a different folder? Type 'cd' followed by the folder name (e.g., cd Documents). Want to go backward one folder? Just type 'cd' .. and hit Enter.
  • CLS (Clear Screen): After running a bunch of commands, your screen is going to be cluttered with endless lines of Matrix-style text. Instead of closing the window and opening a new one, just type 'cls' and hit Enter. It instantly wipes the screen clean, giving you a fresh, blank slate.

Wrapping Up Your CMD Journey

You do not need to be a software engineer or a cyber-security expert to use the Windows Command Prompt. By mastering just a few of these essential CMD commands, you strip away the layers of frustration that come with modern operating systems. You can diagnose your own Wi-Fi issues, revive a frozen system without a hard reboot, securely wipe your data, and manage your hardware like an absolute professional.

It is empowering to look at that flashing white cursor and know exactly what to type to make your computer do exactly what you want. You are no longer just a passive user; you are the administrator.

Keep this article bookmarked as your ultimate Windows CMD commands cheat sheet for the next time your PC decides to throw a temper tantrum.