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 know | Windows | Linux / macOS |
|---|---|---|
| My IP address, gateway and DNS | ipconfig /all | ip addr, ip route |
| Can I reach a device? | ping 8.8.8.8 | ping -c 4 8.8.8.8 |
| Which path does traffic take? | tracert 8.8.8.8 | traceroute 8.8.8.8 |
| Is DNS working? | nslookup example.com | dig example.com |
| Which connections and ports are open? | netstat -ano | ss -tulpn |
| Which MAC addresses has my device learned? | arp -a | ip neigh |
| Get a new address from DHCP | ipconfig /release then /renew | Depends on the system, e.g. sudo dhclient |
| Clear the DNS cache | ipconfig /flushdns | Depends on the system |
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
ipconfig: do I have a valid address?pingthe default gateway: is my local network OK?ping 8.8.8.8: can I reach the internet by IP?nslookup example.com: is DNS working?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:
ipconfigshows192.168.1.40with a gateway of192.168.1.1. The address looks normal, so DHCP worked.ping 192.168.1.1gets replies. The laptop can reach the router, so the Wi-Fi itself is fine.ping 8.8.8.8times 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.
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.