Packet.School
HomeLevelsSandboxFreeAbout
XP0
L5 · Advanced Topics
Level 5
6 lessons
  • 01Subnetting Basics
  • 02Subnet Calculation
  • 03What is NAT?
  • 04VPN
  • 05Terminal Commands
  • 06Final Quiz
Levels/L5 · Advanced Topics/Lesson 05
Terminal · 05

Terminal Commands

GUIs change; the terminal endures. The first thing anyone troubleshooting a network opens is a command line — in this lesson you'll learn when and how to use the five essential commands, then try them in the simulator right below.

Duration
3min
Level
L5
Type
Terminal
Progress
5/ 6

01The five essentials

CommandAnswers the questionExample
pingCan I reach the target?ping google.com
tracerouteWhich path am I taking, where does it stall?traceroute google.com
nslookupWhat's this name's IP? Is DNS working?nslookup google.com
ipconfig / ifconfigWhat are my own network settings?ipconfig
netstatWhich connections do I have open?netstat -an

ping — the connectivity test

code
ping google.com

Sends a small packet (ICMP echo) to the target and waits for a reply. Watch two things in the output: time (latency, ms) and packet loss. If ping works, your physical link and routing are sound.

traceroute — the road map

code
traceroute google.com     (on Windows: tracert)

By sending packets with increasing TTL values, it makes every router along the path identify itself. If there's a problem, it shows which hop it starts at: your home router, your ISP, or the far end?

nslookup — the DNS query

code
nslookup google.com

Tests name resolution. The classic diagnostic for "the site won't load but pinging the IP works": the problem isn't the network, it's DNS.

ipconfig / ifconfig — your own settings

code
ipconfig        (Windows)
ifconfig        (Mac/Linux)

Shows your IP address, subnet mask, and gateway. Step one of troubleshooting is always "who am I?": an IP like 169.254.x.x means you never got an address from DHCP.

netstat — open connections

code
netstat -an

Lists active connections and listening ports on your device. Use it to see which application is talking to where.

02The troubleshooting sequence

The order professionals follow for network problems:

  1. ipconfig — do I have an IP, and is it sane?
  2. ping 192.168.1.1 — can I reach my gateway? (local network test)
  3. ping 8.8.8.8 — can I get out to the internet? (routing test)
  4. nslookup google.com — do names resolve? (DNS test)
  5. traceroute — still broken? Find out where.

These five steps diagnose 90% of "my internet is down" complaints.

03Try it now

The terminal below behaves like a real shell but runs entirely in your browser — no command touches your machine or any real network. Walk through the sequence above:

04Visual comparison

To see what the numbers in those outputs actually mean, explore ping and traceroute in visual form too:

Sandbox · CommandPing & TracerouteCompare latency, loss, and hop counts across destinations, side by side.Open tool

05Summary

  • ping tests reachability, traceroute the path, nslookup DNS
  • ipconfig shows your own settings, netstat your open connections
  • Troubleshooting order: your IP → gateway → internet → DNS → path
Previous
VPN
Next
Final Quiz
On this page
  • The five essentials
  • The troubleshooting sequence
  • Try it now
  • Visual comparison
  • Summary
Packet.School

An open, interactive curriculum for computer networking.

v3.0 · MIT22 lessons live

Learn

  • Lessons
  • Sandbox
  • Levels
  • Free
  • About

Simulations

  • Packet Journey
  • DNS Lookup
  • DHCP Simulator
  • Subnet Calc
  • Network Builder
  • Terminal

Project

  • About
  • Changelog
  • GitHub
  • Contributing
  • Style guide

Newsletter

One short email when a new level ships. No tracking pixels.

© 2026 Packet.School — MIT licensedSupport with a coffeebuilt in the open