1. Ipconfig: Check Your Network Configuration
The ipconfig command shows your current IP address, subnet mask, and default gateway for all active network adapters.
ipconfig
For the full output including your IPv6 address, DNS server, and DHCP information:
ipconfig /all
The most useful variation for troubleshooting DNS issues is:
ipconfig /flushdns
This clears your local DNS cache. If a recently updated website is still loading an old version, or a domain you know is live isn't resolving, flushing DNS is usually the first fix to try.
2. Ping: Test Whether a Host Is Reachable
ping sends four small packets to a host and measures the round-trip time. It's the fastest way to confirm whether a server, website, or network device is reachable from your machine.
ping google.com
If packets are lost or response times are high, there's a connectivity problem between your machine and the destination. If ping returns nothing, the host is either down or configured to block ICMP requests (many servers block pings intentionally, so this isn't always a reliable down indicator).
3. Tracert: Map the Route to a Destination
tracert (traceroute on Linux and macOS) shows every network hop between your computer and a destination, along with the response time at each hop.
tracert verpex.com
High latency concentrated at an early hop usually indicates a local network issue. High latency at a later hop points to a problem further along the route, often outside your ISP's network. Tracert is particularly useful when a site loads slowly but isn't fully down.
4. CLS: Clear the CMD Screen
cls
Clears all previous output from the Command Prompt window. Not a diagnostic tool, but useful when you've run several commands and want to start reading from a clean screen.
5. Dir: List Files and Folders in a Directory
dir lists the contents of the current directory, including file names, sizes, and last modified dates.
dir C:\Users\YourName\Documents
Add /s to recursively list all files in subdirectories. Add /b for a bare list of file names only, which is useful for piping output into other commands.
6. CD: Change Your Working Directory
cd moves you to a different folder within Command Prompt.
cd C:\Users\YourName\Desktop
Use cd .. to move up one folder level. Use cd \ to jump directly to the root of the current drive. Once you're in a directory, all subsequent file commands run relative to that location.
7. Tasklist: See Every Running Process
tasklist outputs all processes currently running on your machine, with the process ID (PID) and memory usage for each.
tasklist
Pipe it with findstr to filter by name:
tasklist | findstr chrome
This is useful for finding a hung process, identifying what's consuming memory, or confirming a service is actually running. In our hosting support queue, customers running Windows VPS plans use tasklist to check whether their web server process is still active after a restart.
8. Taskkill: Stop a Process by PID
Once you have a PID from tasklist, stop that process with taskkill.
taskkill /PID 1234 /F
The /F flag forces the process to terminate even if it's not responding. Replace 1234 with the actual PID. This is faster than Task Manager for processes that have completely stopped responding and won't open normally.
9. SFC /Scannow: Repair Corrupted System Files
System File Checker scans your Windows installation for corrupted or missing system files and replaces them automatically from a cached copy.
sfc scan/scannow
Run this as Administrator: right-click Command Prompt in the Start menu and select "Run as administrator" before entering the command. The scan takes between 5 and 15 minutes. Windows reports what was found and repaired. This is the right starting point when Windows is crashing, behaving unpredictably, or after cleaning a malware infection.
chkdsk scans a drive for file system errors and bad sectors.
chkdsk C: /f
The /f flag fixes file system errors. The /r flag also scans for bad sectors in the drive's storage media. Because the system drive (C:) is in use, Windows schedules this scan for the next restart rather than running immediately. Do not interrupt a chkdsk scan once it starts. Let it run to completion.
Quick Reference: All 10 Commands
Command | Example Use |
|---|
ipconfig | ipconfig – Displays your local IP and network info for quick troubleshooting. |
ping | ping google.com – Confirms internet connectivity and shows latency. |
tracert | tracert google.com – Traces the route your data takes to reach a server. |
cls | cls – Clears the CMD window for a clean workspace. |
dir | dir /p – Lists files one screen at a time; dir /s – Includes subfolders. |
cd | cd Documents – Moves directly into the Documents folder. |
tasklist | tasklist – Displays all running processes on your system. |
taskkill | taskkill /im notepad.exe /f – Forces Notepad to close immediately. |
sfc /scannow | sfc /scannow – Scans and repairs corrupted system files (Admin required). |
chkdsk | chkdsk C: /f – Checks and repairs errors on the C: drive. |