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.
Verified author✓ Valid
Issued to
FM TecHub Team
Role
Editorial team
Reviewer credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

The team writes practical, plain-English guides on networking, security and cloud.

More about the team →

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

Get free updates by email

New notes, tools, CCNA and Security+ tips and important security news from FM TecHub, explained simply. Free, about twice a month. Unsubscribe anytime; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesup

Free · no spam · past emails · powered by Buttondown