Advertisement

CMD Commands Everyone Should Know

Command Prompt (CMD) might look old-school, but it's still super useful. I use these commands all the time to fix problems, manage files, and troubleshoot issues. You don't need to be a computer expert - just copy and paste.

Here are the CMD commands I use most, with explanations of what they do and when to use them.

1. Check Your IP Address

Need to know your computer's IP address?

ipconfig

Shows your IP address, subnet mask, default gateway - all your network info. Useful when setting up networks or troubleshooting connection issues.

For just your IP address: ipconfig | findstr IPv4

2. Flush Your DNS Cache

If websites aren't loading or you're getting weird connection errors, flush your DNS (run as admin):

ipconfig /flushdns

This clears your DNS cache. I do this whenever I'm having weird internet issues and it fixes it about half the time.

3. Release and Renew Your IP

Network problems? Get a fresh IP address (run as admin):

ipconfig /release
ipconfig /renew

Run both commands. This forces your computer to get a new IP address from your router. Fixes a lot of connection issues.

4. Test Your Internet Connection

Ping Google to test if your internet works:

ping google.com

Or ping Google's DNS: ping 8.8.8.8

If you get replies, your internet works. If not, the problem is your connection, not your computer. Press Ctrl+C to stop.

5. See Your System Information

Get detailed info about your computer:

systeminfo

Shows Windows version, install date, RAM, processor, everything. Handy when you need to know what you're working with.

6. See What's on Your Network

See all devices connected to your local network:

arp -a

Shows all devices on your network with their IP and MAC addresses. Useful if you're trying to figure out what's on your Wi-Fi.

Advertisement

7. Check Disk Space

See how much space you have on each drive:

wmic logicaldisk get size,freespace,caption

Shows size and free space for each drive. The numbers are in bytes, so divide by a billion to get GB. Or just use the simpler: dir C:\ to see C: drive info.

8. See Your Wi-Fi Passwords

Forgot your Wi-Fi password? See it here (run as admin):

netsh wlan show profile name="WiFiName" key=clear

Replace "WiFiName" with your actual network name. The password shows up in the "Key Content" field. Useful when you need to connect a new device.

9. List All Wi-Fi Networks You've Connected To

See all networks you've ever connected to:

netsh wlan show profiles

Shows all Wi-Fi networks saved on your computer. Good for cleaning up old networks you don't use anymore.

10. Check Your Battery Health

On a laptop, generate a battery report (run as admin):

powercfg /batteryreport

Creates an HTML file with your battery's health, capacity, and usage history. The file saves to your user folder. Open it in a browser to see the report.

11. Navigate Folders

Basic navigation commands:

  • cd - Change directory (folder). Example: cd C:\Users\YourName\Documents
  • cd .. - Go up one folder
  • dir - List files in current folder
  • cls - Clear the screen

These are the basics. Once you know these, you can navigate anywhere.

12. Copy Files

Copy a file from one place to another:

copy "C:\source\file.txt" "C:\destination\file.txt"

Replace the paths with your actual file paths. Use quotes if there are spaces in the path.

Tips for Using CMD

  • Run as admin when needed: Some commands need administrator rights. Right-click Command Prompt and choose "Run as administrator".
  • Use Tab completion: Start typing a file or folder name and press Tab to auto-complete.
  • Copy from CMD: Right-click the title bar → Edit → Mark, then select text and press Enter to copy.
  • Paste into CMD: Right-click to paste (or Shift+Insert).

Pro Tip: You can save command output to a file by adding > filename.txt to the end of any command. For example: ipconfig > network-info.txt saves your network info to a file.

Common Questions

What's the difference between CMD and PowerShell?

CMD is simpler and older. PowerShell is more powerful and modern. For basic tasks, CMD is fine. For more advanced stuff, PowerShell is better. But both work for most things.

Are these commands safe?

Yes, all the commands I listed are safe. They just read information or do basic Windows tasks. But be careful with commands you find elsewhere - some can delete files or change important settings.

Do I need to know programming?

Not at all. Just copy and paste the commands. Once you get comfortable, you can start modifying them for your needs.

Try These Commands

Open Command Prompt and try a few of these. Start with the simple ones like ipconfig or systeminfo. Once you're comfortable, you'll find yourself using CMD more and more.

Advertisement