Skip to content

Finding technical documentation

Exercise finding-technical-documentation-annex.pdf · PDF

Yesterday Git threw an error message at you that you had never seen before. What did you do? You asked a classmate, you asked the teacher, or you pasted it into a search box. Fair enough. But in July none of us will be there — and in your first job, nobody will have time to answer every question.

Every technician, however senior, looks things up all day. The difference between a beginner and a professional is not knowing everything: it is knowing where to look, in what order, and whom to believe. Get that wrong and you may copy a command from a stranger that leaves a server open to everybody.

What you will learn

  • Get help from the program itself: --help, man, man -k, help and /usr/share/doc
  • Choose the right section of the manual (man 5 passwd is not man passwd)
  • Order sources on a ladder, from the program itself down to a video or an AI answer
  • Narrow a web search with "quotes", site:, -word, filetype: and after:
  • Judge a source with five checks and cite it so others can find it again
  • Why a forum answer that "works" can be the most dangerous one

The ladder of sources

Technical documentation is any written explanation of how a program or system works and how to use it: manuals, help texts, wikis, guides.

Not all of it is equally trustworthy. Picture a ladder with five steps. The higher the step, the more you can trust it.

Step Source Why it sits there
1 The program itself: --help, man, /usr/share/doc It describes exactly the version installed on this machine. Works with no network.
2 Official documentation of the project or vendor Written by the people who make it. Says which version it is for.
3 Community wikis (Debian Wiki, Arch Wiki) Many eyes, kept up to date. Check that it applies to your system.
4 Question-and-answer sites and forums Somebody had your exact error. Quality varies: look at the date and the votes.
5 Blogs, videos, answers from an AI Quick to read. Nobody answers for them.

The rule of the ladder: go down to find an idea quickly; climb back up to prove it before you run it on a server.

flowchart BT
    S5["<b>5 · Blogs, videos, AI</b><br>fast idea, nobody answers for it"] --> S4["<b>4 · Forums, Q&A sites</b><br>someone had your error"]
    S4 --> S3["<b>3 · Community wikis</b><br>many eyes"]
    S3 --> S2["<b>2 · Official docs</b><br>written by the makers"]
    S2 --> S1["<b>1 · The program itself</b><br>your exact version"]

A little history: older than the Internet

Step 1 is the oldest. The first Unix Programmer's Manual is dated 3 November 1971. The idea that every command arrives with its own page is why man still works on a machine with the cable unplugged. Step 4 is changing under our feet: Stack Overflow, opened in September 2008, received 3,862 new questions in December 2025 — 78 % fewer than a year earlier, against more than 200,000 a month in 2014. People now ask an AI instead; and the AI learned from those very answers.

Step 1: ask the machine first

--help: the short version

Almost every command prints a summary of its options with --help:

ls --help

Among many lines you find:

  -h, --human-readable       with -l and -s, print sizes like 1K 234M 2G etc.

Long output? Filter it with grep, the tool you already know:

tar --help | grep exclude

One of the lines is --exclude=PATTERN, "exclude files, given as a PATTERN".

man: the full manual

A man page (manual page) is the complete reference of a command, installed together with it.

man git-commit

A man page opens inside less, the pager from Unit 4. You do not read it top to bottom — you search inside it:

Key What it does
/amend then Enter Search for the word amend
n Jump to the next match
q Quit

Searching /amend tells you that --amend replaces the last commit with a new one instead of adding another.

man -k: when you don't know the name

You want to change when a password expires, but you don't know which command does it. Search the descriptions of all man pages:

man -k password

Among the results:

chage (1)            - change user password expiry information

The command is chage. If man -k prints "nothing appropriate" for everything, the manual index was never built; sudo mandb builds it in about a minute.

Sections: the number in brackets

There can be more than one page with the same name. Look:

whatis passwd
passwd (1)           - change user password
passwd (5)           - the password file

Some machines also show passwd (1ssl). The number in brackets is the section of the manual:

Section Contains
1 User commands
5 File formats and configuration files
8 System administration commands

man passwd opens section 1, the command. To read about the file /etc/passwd, ask for section 5:

man 5 passwd

It tells you each line has seven fields separated by :, and the third one is the numerical user ID. When you see passwd(5) written in a document, it means "the page passwd in section 5".

help: for commands built into Bash

type cd
cd is a shell builtin

cd is not a separate program: it is part of Bash itself. That is why man cd answers No manual entry for cd. Builtins have their own help:

help cd

/usr/share/doc: the extras

Every Debian package can leave extra files in /usr/share/doc/<package>/: the copyright file you used to prove licences, changelogs, sometimes examples.

Ask the web, with care

Search operators

A search operator is a special word or symbol that tells the search engine how to filter the results.

These are all in Google's own help page, and most engines accept them:

Operator Effect Example
"..." These exact words, in this order "Permission denied (publickey)"
site: Only this website site:wiki.debian.org fstab
-word Without this word python install -snake
filetype: Only this kind of file routeros manual filetype:pdf
after: Only results after a date debian samba share after:2025

The best trick of all: paste the error message in quotes, and add site: with the official documentation.

"connection refused" site:debian.org

Careful: the first result is not the best answer

The first result is the one the engine ranks first — often an advert, or a page written to be found rather than to be right. Ranking is not truth.

Five checks for any source

Before you believe a source, ask:

  1. Who wrote it?
  2. When?
  3. For which version and which system?
  4. Does it explain why, or only say "paste this"?
  5. Where else is it confirmed?

Try them on two sources for the same problem — your Samba share answers "access denied":

Check Source X: a forum post Source Y: the Samba project wiki
Who? "linuxgod99", anonymous The project that makes Samba
When? 2013 Updated this year
Which version? Not stated Samba 4
Explains why? No: "Just run this and it works: sudo chmod -R 777 /srv" Yes: "A user needs permission twice: in the share definition and in the file system. Check both..."

Source X fails four checks. And remember Unit 5: 777 gives read, write and execute permission to everybody, recursively, on every file under /srv. It "works" — the share opens, you move on — and now anyone can delete the company's files.

Careful: 'it works' is not 'it is right'

A source that only says "run this" is asking you to trust a stranger with sudo. Code with no explanation is an order from someone you don't know. Follow Source Y.

Where AI sits on the ladder

Course rule, again: the only AI allowed here is cs50.ai, as a tutor. On the ladder it sits on step 5: fast, fluent, with no author and no date. Use it the way you would use a classmate — to get an idea and the right words to search for. Then climb: does man say the same?

One more reason to climb: the option an AI gives you may belong to another version of the program. The man page on your machine cannot make that mistake. The AI knows text written about many systems; your man page knows yours.

Cite what you used

From now on, every page of your documentation repository ends with its sources. A reference is complete when a stranger can find it again, so it needs four things: title, publisher, address and the date you read it.

- Setting up a share — Samba Wiki — https://wiki.samba.org/... — read 28/05/2027

The Exercise sheet ends by adding a docs/08-references.md page to your tramuntana-docs repository with three sources you really used in Unit 6, then committing and pushing it, as you learnt in the Git sessions.

Key takeaways

  • Climb the ladder: the program itself, official docs, community wikis, forums, then blogs, videos and AI. Go down for ideas, climb up for proof.
  • --help for a summary, man page for the full reference (search with /word, n, q), man -k when you don't know the name, help for Bash builtins.
  • The number in brackets is the manual section: 1 commands, 5 file formats, 8 administration — man 5 passwd is the file, not the command.
  • Search operators ("...", site:, -word, filetype:, after:) turn a thousand results into the right ten.
  • Judge every source with five checks: who, when, which version, why, where else.
  • A reference needs a title, a publisher, an address and the date you read it.

Quick check

1. Which source describes exactly the version of a program installed on your machine?
  • Its man page
  • The first web result
  • A video from last year
  • An answer from an AI

The man page is installed with the program, so it always matches your version — and it works with no network. That is why it sits on step 1 of the ladder.

2. Which search finds the exact error message only on one website?
  • "connection refused" site:debian.org
  • error ssh debian help
  • site:"connection refused"
  • -debian.org connection refused

Quotes match the exact words, and site: followed by a domain limits the results to that website. -debian.org would do the opposite: exclude it.

3. What does man 5 crontab open?
  • The format of the crontab file
  • The fifth page of the crontab manual
  • The crontab command itself
  • Five different manual pages

The number is the section: 5 is file formats and configuration files. The command crontab would be in section 1.

4. You run man cd and get No manual entry for cd. Why?
  • cd is a shell builtin, part of Bash itself, so it uses help cd
  • cd is too simple a command to need any documentation
  • The manual index is broken and needs sudo mandb
  • cd only exists on Windows, not on Debian

type cd answers cd is a shell builtin. Builtins are not separate programs, so they have no man page of their own; help cd shows their help.

5. You know you need a command about password expiry, but not its name. What do you run?
  • man -k password
  • man password
  • password --help
  • help password

man -k searches the descriptions of all man pages. Among the results is chage (1) - change user password expiry information.

6. A forum answer says just run this as root and gives a command, nothing else. What do you do?
  • Look for the reason in the official documentation before running anything
  • Run it, because it has many votes
  • Run it directly on the server to see if it works
  • Ask an AI to run it for you

A command with no explanation fails the why check. Climb the ladder to the official documentation: "it works" can still mean the server is now open to everybody, as chmod -R 777 would do.

7. You must cite a page you used in your documentation repository. Select the two that a complete reference must contain.
  • The address of the page
  • The date you read it
  • The number of results the search engine returned
  • Your own opinion of the author

A reference is complete when a stranger can find it again: title, publisher, address and the date you read it — pages change.

You now know where good documentation comes from. Next you start producing it: the same Markdown you have written all year becomes a PDF with one command — Docs as code.