# Appendix: The Setup Guide

> From *The Confident Learner: Tech and Domain Fundamentals for the AI Era* by Dharanova Pioneer, a free online book.
> Web page: https://elephantbamboo.com/appendix/setup-guide · Licence: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/)

*Referenced from Chapter 2 (installing WSL) and Chapter 6 (installing PostgreSQL), and useful any time this book asks you to install something on your own machine.*

---

## How to use this guide

Each tool below has its own short section: what it is, how long it takes, what it needs, and what to do if it does not work. You do not need to read this guide front to back. Come to it when a chapter's ritual sends you here, do that one section, and go back to the chapter.

If you get stuck on any step in this guide for more than fifteen minutes, stop, and see "If you are stuck" at the end. Struggling silently for an hour is not the discipline this book is trying to build in you. Asking for help after a genuine, timed attempt is.

---

## WSL — Windows Subsystem for Linux

**What it is.** A real Linux environment that runs alongside Windows on the same machine, so that every Linux command this book teaches works exactly as written, without you needing a second computer or a dual-boot setup.

**Who needs this.** Only readers on Windows. If you are on macOS or Linux, skip this entire section — your terminal is already a Unix terminal, which is what Chapter 3 assumes.

**Time.** About fifteen to twenty-five minutes, most of it waiting for a download, plus a restart.

**What it needs.** Windows 10 (version 2004 or later) or Windows 11. About 2–4 GB of free disk space for a minimal Linux install. Roughly 2 GB of free RAM is comfortable to run alongside your other programs; it will work with less, just more slowly. A stable internet connection for the download — expect around 500 MB to 1 GB depending on which Linux distribution you install.

**Steps.**
1. Open PowerShell as an administrator (right-click the Start button, choose "Windows PowerShell (Admin)" or "Terminal (Admin)").
2. Type `wsl --install` and press enter. This installs WSL itself and, by default, Ubuntu — a common, well-documented Linux distribution that every command in this book will work on.
3. Restart your computer when it asks you to.
4. After restarting, a terminal window should open on its own to finish setup. If it does not, search your Start menu for "Ubuntu" and open it.
5. It will ask you to create a username and password for this new Linux environment. These are separate from your Windows login — pick anything, write it down somewhere for now, and do not worry about forgetting it later; it is easy to reset.
6. Once you see a prompt like `yourname@yourcomputer:~$`, you are in. Try `pwd` and `ls`, the first two commands Chapter 3 teaches, to confirm it works.

**Low-bandwidth option.** If a 500 MB–1 GB download is not realistic on your connection right now, you can still do almost everything in Chapter 2 and Chapter 3 using the free browser-based terminals available — they will not teach you WSL specifically, but they will let you practise every command. Install WSL properly when you have a better connection, ideally before Chapter 3's ritual, but do not let it block you from reading ahead.

**If it does not work.** The most common failure is an older Windows version that does not support `wsl --install` in one step. Search "install WSL manually Windows 10" and follow Microsoft's own current instructions — Microsoft's documentation for this changes occasionally and is more reliable than any book's fixed snapshot of it. If you are still stuck after fifteen minutes, this is exactly the kind of question worth asking the person from Chapter 3's "Ask" ritual, or any senior student or working engineer you know. "I ran `wsl --install` in an admin PowerShell and got this specific error" is already a well-formed question by Chapter 15's standard, even though you have not read Chapter 15 yet.

---

## PostgreSQL — for Chapter 6

**What it is.** A free, real, production-grade relational database — the same kind of database many companies in this book's worked examples actually run.

**Time.** About fifteen minutes to install, a few more to create your first database.

**What it needs.** Roughly 200–300 MB of disk space for the installation itself, plus room for whatever data you add, which will be tiny for Chapter 6's exercise. Any machine that can run a modern browser can run PostgreSQL comfortably.

**Steps, by operating system.**

*Windows.* Download the installer from [postgresql.org/download/windows](https://www.postgresql.org/download/windows/) — the official source, not a mirror. Run it. Accept the defaults for everything except the password prompt, where you set a password for the default `postgres` user — write it down. At the end, it offers to open "Stack Builder" for extra tools; you can skip that. Open "SQL Shell (psql)" from your Start menu to confirm it worked; it will ask for the password you just set.

*macOS.* The simplest route is Postgres.app, a self-contained application: download it from [postgresapp.com](https://postgresapp.com), drag it to Applications, open it, and click "Initialize" to create your first server. No password setup needed for local use. Alternatively, if you already use Homebrew, `brew install postgresql` works too.

*Linux, or WSL on Windows.* `sudo apt update` followed by `sudo apt install postgresql`, then `sudo service postgresql start`. Confirm it worked with `sudo -u postgres psql`.

**No-install alternative, for now.** If installing a database feels like one new thing too many while you are still finding your feet, you can get real practice with the *ideas* in Chapter 6 — writing queries, running `EXPLAIN`, seeing an index change a query plan — using a free browser-based SQL sandbox such as [db-fiddle.com](https://www.db-fiddle.com), no installation required. It uses a different underlying database engine than PostgreSQL, so a few small syntax details will differ, but the concepts (indexes, `EXPLAIN`, JOINs) transfer completely. Treat this as a legitimate way to do Chapter 6's ritual now, and install PostgreSQL properly when installing new software on your machine feels like less of a hurdle.

**If it does not work.** Installer failures are almost always a permissions issue (try running the installer as administrator on Windows) or a port conflict (something else is already using PostgreSQL's default port 5432, usually because you have an old install you forgot about). Search the exact error message; PostgreSQL is old, extremely well-documented software, and almost every error you will see has already been answered publicly.

---

## Git — for Chapter 12 and beyond

**What it is.** The version control system Chapter 12 teaches. Most online code-editing tools already have it available, but you will eventually want it on your own machine.

**Time.** Under five minutes.

**Steps.** *Windows:* download and run the installer from [git-scm.com](https://git-scm.com) — the defaults are fine for everyone starting out. *macOS:* open a terminal and type `git --version`; if it is not already installed, macOS will offer to install Apple's developer tools, which include it. *Linux or WSL:* `sudo apt install git`.

**Confirm it worked.** Type `git --version` in a fresh terminal window. Any version number means you are ready.

---

## General principles for installing anything this book asks you to

A few habits that apply beyond this guide, useful for the rest of your career, not just this book.

Always download developer tools from the tool's own official website, not a search result that merely claims to be it. [postgresql.org](https://www.postgresql.org) and [git-scm.com](https://git-scm.com), and similar, are safe because they are the source, not a copy.

If an install fails, read the actual error message before searching for it. Copy the exact text, not your summary of it, into a search engine or an AI tool. The exact wording usually narrows the problem enormously.

Installing developer tools rarely, if ever, requires paying anyone. Every tool in this book is free for an individual learner. If a page asks you to pay to "activate" something this guide described as free, you are on the wrong page.

## If you are stuck

Fifteen minutes of genuine, focused effort on any one step in this guide is a reasonable amount to spend before asking for help. Beyond that, you are not failing — you have found exactly the kind of specific, well-defined question this book keeps telling you is worth asking. Take the exact error message, what you were trying to do, and what you have already tried, to a working engineer, a senior student, or an AI tool, in that order of preference when a person is available. This is precisely the "Ask" habit Chapter 1 introduces, arriving slightly earlier than the book expected you to need it.
