CHAPTER 12 · 6 lessons · 78 exercises
Keep it running
Run it at a set time. Keep a record. Connect to a server of your own.
So far the tools have all been "type it and it runs". This chapter is about the things that keep running while you are not watching.
crontabandcrond— run it at a set time, by itselfloggerand/var/log— keep a record, and read itip addr— check your own addressping— check whether it reachesnetstat— see what is waitinghttpdandwget— stand up a web server of your own and connect to it yourself
The last of those is, I think, where this course feels most like everything joining up. What you look at in a browser every day turns out to be an ordinary program that starts with one command.
Something to say honestly. This Linux is not connected to the internet outside. It runs inside your browser, so getting out needs a separate relay, and this course does not have one.
So ping 127.0.0.1 (yourself) comes back, and ping 8.8.8.8 (a server outside) does not. It is not broken; it is built that way. Save curl, ssh and git, which go outside, for your own computer after you graduate.
The 127.0.0.1 that means yourself is a special address called the loopback, and every computer has one. Even without getting out, the thinking behind networks takes hold here.
Lessons in this chapter
Run on a schedule, keep a log
- 65Running at a settled timeBuild something that runs without your typing. You hand over one table of times.Go to the exercises
- 66Keeping a recordMix your own words into the machine's record, in a shape you can read back later.Go to the exercises
Your own address, your own server
- 67Checking your own addressRead your name and number on the network. What you reach, and why you do not.Go to the exercises
- 68Checking whether it reachesSend and see if it comes back. When it does not, read where it stopped.Go to the exercises
- 69Seeing the doors that are openRead the list of doors being waited at. Learn what comes back when you knock on a shut one.Go to the exercises
- 70Standing up a server of your ownRun the one who hands out files, and fetch from it yourself. Read the number and the headings that come back.Go to the exercises