Back to Articles
Troubleshooting2025-12-2612 min read

Network Troubleshooting: 10 Essential Commands Everyone Should Know

Master essential network commands like ping, traceroute, nslookup, and more. Complete guide with real-world troubleshooting examples.

Master these 10 essential network commands to diagnose connection issues, test connectivity, and troubleshoot network problems like a pro. This comprehensive guide covers commands for Windows, Mac, and Linux.

1. Ping - Test Network Connectivity

What it does: Tests if a host is reachable and measures round-trip time.

Command: ping example.com

Use cases:

  • Check if a website/server is online
  • Measure network latency
  • Detect packet loss

Try our graphical Ping Tool for easier testing!

2. Traceroute/Tracert - Trace Network Path

What it does: Shows the path packets take to reach a destination.

Command:

  • Windows: tracert example.com
  • Mac/Linux: traceroute example.com

Use cases:

  • Identify where connection fails
  • Find network bottlenecks
  • Diagnose routing issues

3. Nslookup - DNS Lookup

What it does: Queries DNS servers to find IP addresses for domain names.

Command: nslookup example.com

Use cases:

  • Verify DNS resolution
  • Check which DNS server is being used
  • Troubleshoot DNS issues

4. Ipconfig/Ifconfig - Network Configuration

What it does: Displays network adapter configuration.

Command:

  • Windows: ipconfig /all
  • Mac/Linux: ifconfig or ip addr show

Use cases:

  • Find your IP address
  • Check DNS servers in use
  • View network adapter details

5. Netstat - Network Statistics

What it does: Shows active network connections and listening ports.

Command: netstat -an

Use cases:

  • See all active connections
  • Check which ports are open
  • Identify suspicious connections

6. Curl - Test HTTP/HTTPS Requests

What it does: Makes HTTP requests from command line.

Command: curl -I https://example.com

Use cases:

  • Test website response
  • Check HTTP headers
  • Debug API issues

7. Dig - Advanced DNS Lookup

What it does: Detailed DNS query tool (Mac/Linux).

Command: dig example.com

Use cases:

  • Get detailed DNS information
  • Query specific record types
  • Troubleshoot DNS propagation

8. Route - View Routing Table

What it does: Displays and modifies network routing table.

Command:

  • Windows: route print
  • Mac/Linux: route -n

9. Arp - View ARP Cache

What it does: Shows IP-to-MAC address mappings.

Command: arp -a

Use cases:

  • See devices on local network
  • Troubleshoot local network issues

10. Pathping - Combined Ping and Traceroute

What it does: Combines ping and traceroute with statistics (Windows).

Command: pathping example.com

Use cases:

  • Detailed route analysis
  • Find packet loss at each hop

Common Troubleshooting Workflows

Website Won't Load

  1. Run ping example.com - Check if site is reachable
  2. Run nslookup example.com - Verify DNS works
  3. Try ping 8.8.8.8 - Test if internet works at all
  4. Flush DNS cache

Slow Internet Connection

  1. Run speed test - Measure current speeds
  2. Run ping -t gateway_ip - Check local network latency
  3. Run traceroute example.com - Find where delay occurs
  4. Check netstat -an - See if something is using bandwidth

Can't Connect to Specific Website

  1. Ping the domain - Is it responding?
  2. Nslookup the domain - Is DNS working?
  3. Try different DNS server (1.1.1.1)
  4. Flush DNS cache and browser cache

Quick Reference Table

CommandPurposeWhen to Use
pingTest connectivityWebsite not loading
tracerouteFind network pathFind where connection fails
nslookupDNS lookupDNS problems
ipconfigNetwork infoCheck IP/DNS settings

Prefer GUI Tools? Use our web-based Ping, DNS Lookup, and Speed Test tools - no command line needed!