Free tech learning for everyone, from basics to pro

Start hereIT support & systemsBasics

Essential network commands every beginner should know

In short: A few commands answer most "is the network working?" questions: ipconfig shows your settings, ping tests reachability, tracert shows the path, and nslookup tests DNS.

The core commands

What you want to knowWindowsLinux / macOS
My IP address, gateway and DNSipconfig /allip addr, ip route
Can I reach a device?ping 8.8.8.8ping -c 4 8.8.8.8
Which path does traffic take?tracert 8.8.8.8traceroute 8.8.8.8
Is DNS working?nslookup example.comdig example.com
Which connections and ports are open?netstat -anoss -tulpn
Which MAC addresses has my device learned?arp -aip neigh
Get a new address from DHCPipconfig /release then /renewDepends on the system, e.g. sudo dhclient
Clear the DNS cacheipconfig /flushdnsDepends on the system
Test from your device outwardsipconfigdo I have anaddress?ping gatewayis my routerthere?ping 8.8.8.8can I reachout?nslookupdo names work?tracertwhere does itstop?
Figure 1. Like checking a journey stop by stop, test your own settings first, then your router, then the internet, then names, and use tracert to see where traffic stops.

Reading ping results

  • Reply from … time=12ms: working. Lower times are better.
  • Request timed out: no reply. The device may be off, unreachable, or blocking ping with a firewall.
  • Destination host unreachable: your device or a router has no route to it.

A simple order to test in

  1. ipconfig: do I have a valid address?
  2. ping the default gateway: is my local network OK?
  3. ping 8.8.8.8: can I reach the internet by IP?
  4. nslookup example.com: is DNS working?
  5. tracert: where does traffic stop?

See the full process in the "Users can't reach the internet" playbook.

Real-world example: "the Wi-Fi isn't working" at home

A student's laptop says it is connected to Wi-Fi, but nothing loads. Instead of restarting everything at random, they work outwards:

  1. ipconfig shows 192.168.1.40 with a gateway of 192.168.1.1. The address looks normal, so DHCP worked.
  2. ping 192.168.1.1 gets replies. The laptop can reach the router, so the Wi-Fi itself is fine.
  3. ping 8.8.8.8 times out. Nothing gets beyond the router.

That points away from the laptop and towards the router's link to the provider. The router's internet light is red, and other devices in the house cannot get online either. Restarting the router does not help, so they check the provider's service status on mobile data and find a reported outage in the area. Three commands saved an hour of changing laptop settings that were never the problem.

Try this: while everything is working, run the same steps on your own network and note the normal results, such as your gateway address and typical ping times. When something breaks, you will know what "normal" looked like.

Key takeaways

  • ipconfig / ip addr show your settings.
  • ping tests reachability; tracert shows the path.
  • nslookup / dig test DNS.
  • Test in order: address → gateway → internet → DNS.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.