Unit 3 路 Linux^2 路 Lesson 32 of 34
Ping Pong!
A quick peek at networking
You'll use these constantly the second you run Linux for real, so they're worth knowing.
ping
ping checks if another computer (or website) is reachable by firing tiny messages at it and waiting for a reply.
[user@linux]$ ping google.com
It keeps going forever until you hit Ctrl+C. Each reply shows how long it took in milliseconds. Nothing coming back means the other side is down or something is blocking you.
馃挕 Want it to stop on its own?
ping -c 4 google.comsends 4 and quits.
curl
curl grabs whatever is at a web address and prints it straight into your terminal.
[user@linux]$ curl example.com
What you get back is the raw HTML of the page, the same stuff your browser reads to draw it. That includes stuff your browser doesn't show you, like comments developers left in the code. In cybersecurity, curl gets used all the time to poke at websites without ever opening a browser.
馃挕 Your practice box isn't connected to the internet, so
curl example.comwon't work in there. Don't worry, you'll get a website of your own to curl in a minute.
localhost
localhost is a special name that always means "this computer, right here." It's how a computer talks to itself.
Try it
The CyberAcad Ping Pong Club has a tiny website running right inside your box, at http://localhost:8080. Alex built it. Alex also left something in it that was never supposed to be public.
We'll go way deeper into networking in a future course. (Wink wink.)
Live Linux terminal
This lesson comes with a real Ubuntu machine that runs in your browser, so you type every command yourself. Create a free account to do this part.
Do this lesson for real
With a free account you get the terminal, the challenges and the checks that go with every lesson in Intro to Linux, and your progress is saved as you go. CyberAcad is a 501(c)(3) nonprofit, so there is nothing to pay.