Lesson 5 - Networking Basics

Progress 0%

Interactive Terminal Sim:

Linux and the Network

Most Linux machines don't work in isolation — they're servers, routers, and devices that talk to other computers constantly. Because of this, Linux comes packed with command-line tools for checking, testing, and working with networks.

In this lesson you'll learn how to check whether another computer is reachable, look at your own network settings, and move data between machines.

Testing Connectivity with ping

ping sends small packets of data to another computer and waits for a reply. It's the quickest way to check whether a host is reachable over the network:

ping example.com

Each reply line shows how long the round trip took, in milliseconds. If a host stops responding, or the replies are very slow, that usually points to a network problem.

Viewing Your Network Interfaces

To see the network interfaces on your own machine, along with their IP addresses, use:

ip addr

This lists every network interface the computer has, such as lo (the loopback interface, used to talk to itself) and eth0 (a typical wired network interface), together with the IP address assigned to each one.


To see the path packets take to reach another host, hop by hop, use traceroute:

traceroute example.com

Fetching and Copying Data

curl fetches data from a URL directly in your terminal. It's often used to test web servers or APIs without opening a browser:

curl https://example.com

To move files securely between two computers over a network, Linux uses scp ("secure copy"), which works over the same encrypted connection as SSH:

scp Documents/notes.txt student@server:/home/student/

Between ping, ip addr, traceroute, curl and scp, you now have the basic toolkit for checking connectivity, viewing your own configuration, and moving data across a network.