Side reading

Every section of this book has a prompt you can copy. This page is about using them well, because the difference between learning from this and ending up with a server you do not understand is mostly habit.

It is about the conversation, not about access. Giving an assistant a login on your server, or letting it run commands there unattended, is a different decision with a much larger blast radius, and this page does not cover it.

What the prompts contain #

When you copy one, you get a block of text with several parts already filled in:

  • A set of instructions about how to help you. One diagnostic command at a time, the reason before the fix, you doing the typing, and no wandering off to reorganise the rest of your server.
  • Where you are. The book, the chapter, the section heading.
  • What you have already built, accumulated from every chapter before this one. This is why you do not have to explain your setup.
  • What the current chapter is for, and what state your machine should be in.
  • A slot for your error, at the bottom, where you paste what you actually ran and what it printed.

That last part is the only bit you have to write, and it is the part that decides how useful the answer is.

The habit that makes this work #

Read the error first. Then form a guess. Then ask.

It slows you down by about ninety seconds. What it buys you is the ability to tell a good answer from a plausible one. If you have no opinion about what is wrong, then any confident explanation will do, and you will accept the first one you are given. If you arrived with a hypothesis, you are having a conversation instead, and you will notice when the reply does not fit.

A useful test: before you paste, try to finish this sentence out loud. "I think the problem is X, because Y." If you cannot, spend two more minutes reading the output. Linux error messages are far more informative than their reputation suggests. They are just written by people who assumed you already knew the vocabulary, which after a few chapters of this you will.

Paste the whole thing #

The most common way to get a bad answer is to summarise the error yourself.

"It says permission denied" throws away the part that mattered. Which file, which user, which operation, and what came in the four lines before it. Paste the command you ran and everything it printed, including the parts that look irrelevant, because you are not yet in a position to know what is irrelevant. That is the whole point of asking.

Same for configuration. If the question is about a file, paste the file. If it is about a service, paste systemctl status and the last twenty lines of its log.

When it is wrong #

It will be, sometimes, and it will be wrong in a particular way: fluent, specific, plausible, and about a machine other than yours. This happens because it cannot see your machine and because sounding certain is easier than being certain.

Some ways this shows up on a home server, all of which I have seen:

  • A flag that does not exist in your version of the tool. Versions matter enormously here, and the internet is full of instructions for the release before yours.
  • A path that is nearly right. /etc/ssh/ssh_config instead of /etc/ssh/sshd_config will waste a genuinely annoying amount of your time.
  • A confident diagnosis that fits the symptom but contradicts something you can see. Firewall blamed for something that never reached the network.
  • Advice to disable a security control to make an error go away. Sometimes correct as a diagnostic step, almost never correct as a fix, and it should always come with a plan to put it back.

What to do about it is short:

  1. Trust what you can see over what you were told. Your terminal is the authority. The assistant is a colleague who is not in the room.
  2. Say so plainly. "That flag does not exist in my version, here is --help." A good response to that is a correction, not a defence.
  3. Ask what would settle it. "Which single command would distinguish between your explanation and mine?"
  4. Refuse the vandalism. If you are told to turn off a protection, ask what specifically it is blocking and how you would confirm that. Often the real answer is a narrower rule.

Two things worth never doing on a suggestion alone

Anything that writes to a raw disk device, and anything that reinstalls or wipes to "start clean". Both are occasionally the right answer and neither should be reached for before you understand the problem. If you are told to do either, that is the moment to stop and ask what evidence points there.

The commands you should not need to be given #

There is a small set worth knowing by hand, because reaching for a prompt to remember them is where the learning quietly stops:

$ systemctl status <unit>
$ journalctl -u <unit> -b --no-pager | tail -40
$ ss -tlnp
$ ip -brief addr
$ df -h
$ ls -la <the directory in the error message>

Nearly every problem in the first half of this book is diagnosed by two or three of those. If you can run them and describe what you see, you are already doing the part that matters, and the assistant is just filling in the vocabulary.

Using it to go deeper, not just to unstick #

The prompts are framed around being stuck, but the more valuable use is the other one. When a chapter tells you that something is true and you want to know why, ask. When a chapter makes a trade-off and you suspect it is the wrong one for you, argue about it. When you have finished a chapter, ask it to quiz you on what you just did and see whether your explanations hold up.

Following instructions and explaining them are different skills, and the second is the one that helps at 11pm.

Settings

Your values

The book is written with placeholder names so it makes sense to everybody. Put your own in and every chapter, every command and every copy-paste prompt updates to match.

Nothing here is sent anywhere. It is saved in this browser, so it comes back next time. A different browser or a private window gets the placeholders again.

Live preview

$ ssh admin@192.168.1.20
$ sudo ufw allow from 192.168.1.0/24 to any port 22 proto tcp
$ sudo hostnamectl set-hostname homeserver
$ sudo timedatectl set-timezone Europe/Paris

Real commands from chapters 2, 3 and 4. They change as you type.

The account you log in as. Not root, and not necessarily the same name you use on your laptop.

Introduced in Chapter 2, Meet your server

The book's placeholder is admin

What the machine calls itself. You choose it, and it shows up in your shell prompt and your logs.

Introduced in Chapter 3, A safe front door

The book's placeholder is homeserver

The IP address your server has on your home network, from ip -brief addr.

Introduced in Chapter 2, Meet your server

The book's placeholder is 192.168.1.20

The address range and prefix shown by ip route or ip -brief addr, written in CIDR form. Copy the real prefix; do not guess /24.

Introduced in Chapter 2, Meet your server

The book's placeholder is 192.168.1.0/24

The address traffic goes to on its way out of your house, from ip route.

Introduced in Chapter 2, Meet your server

The book's placeholder is 192.168.1.1

In Region/City form, or Etc/UTC if you would rather read logs in UTC.

Introduced in Chapter 3, A safe front door

The book's placeholder is Europe/Paris

A registered name you control. Chapter 8 uses it for the LAN route; chapter 12 uses a separate private Tailscale name remotely.

Introduced in Chapter 8, One door, many rooms

The book's placeholder is example.com

The email identity allowed to administer the tagged server in your Tailscale policy.

Introduced in Chapter 10, Your own private network

The book's placeholder is you@example.com

The mailbox that should receive actionable home-server alerts.

Introduced in Chapter 14, Knowing it is alive

The book's placeholder is alerts@example.com

Once you save, the prose and the commands read with your names, the copy buttons copy your values, and the copy-paste prompts describe your machine accurately. That last one matters: an assistant told your network is 192.168.1.0/24 when it is not will send you chasing the wrong thing.

Anything you leave empty keeps the book's placeholder.