0Pricing
Linux Networking & TCP/IP for Developers · Lesson

Basic Network Commands

Learn to use essential command-line tools like `ip`, `ping`, `traceroute`, and `netstat` to inspect and diagnose network connectivity.

Basic Network Commands is a free Linux Networking & TCP/IP for Developers lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Linux Networking & TCP/IP for Developers learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Basic Network Tools Intro

Time for the command line. You'll learn ping, ip, traceroute, and netstat — the core tools for inspecting and diagnosing connectivity.

Ping: Check Host Reachability

ping is your first reachability check: it sends ICMP echo requests and times the replies, telling you if a host is up and how fast it responds.

Ping Command in Action

Just type ping plus an IP or hostname. The -c flag limits how many packets you send — run this to try it.

ping -c 4 google.com

IP: The Modern Network Tool

The ip command is the modern replacement for older tools like ifconfig. It views and configures interfaces, addresses, and routes.

IP: Display Addresses

Run ip addr show (or ip a) to list every interface with its MAC, IPv4/IPv6 addresses, and state — your snapshot of what's connected.

ip addr show

IP: View Routing Table

The routing table tells Linux where to send traffic. Inspect it with ip route show (or ip r) to see routes and gateways.

ip route show

Traceroute: Map the Path

traceroute maps the path packets take to a host, revealing each router (hop) and its timing — great for pinpointing where delays creep in.

Traceroute in Action

traceroute sends packets with rising TTL values. Each hop decrements TTL; when it hits zero, that router replies and reveals itself.

traceroute google.com

Netstat: Network Statistics

netstat shows network statistics — active connections, routing tables, and interface stats. Handy for seeing which ports are open.

Quick Check: Identify the Command

You're trying to quickly determine if your Linux machine has an internet connection by checking if a remote server is online and responding. Which command would you use?

Recap: Essential Network Tools

Recap of your toolkit: ping checks reachability, ip shows interfaces and routes, traceroute maps the path, and netstat lists connections and ports.

Frequently asked questions

Is the “Basic Network Commands” lesson free?

Yes — the full text of “Basic Network Commands” is free to read here on the web, and the Linux Networking & TCP/IP for Developers course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Linux Networking & TCP/IP for Developers course, upgrade to CoddyKit PRO.

What will I learn in “Basic Network Commands”?

Learn to use essential command-line tools like `ip`, `ping`, `traceroute`, and `netstat` to inspect and diagnose network connectivity. You practise Linux Networking & TCP/IP for Developers with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Linux Networking & TCP/IP for Developers?

No prior experience is required. Linux Networking & TCP/IP for Developers on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Basic Network Commands” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Linux Networking & TCP/IP for Developers lesson?

Yes. Every Linux Networking & TCP/IP for Developers lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Linux Network Essentials
  2. Basic Network Commands
  3. Network Interfaces & IP
  4. Inspecting Network Connections and Sockets
← Back to Linux Networking & TCP/IP for Developers