Unit 1

Moving around

Find out where you are, look around, and go places.

  1. 01Where am I?Your first commands: pwd, ls, and ~ for home.Start
  2. 02Going places with cdMove between folders: cd, paths with /, .. for up, and cd ~ for home.Open
  3. 03Absolute paths and cd -Paths that start at the top of the disk, and cd - to go back.Open
  4. 04Flags and hidden filesChange how a command behaves with flags: ls -a and ls -F.Open
  5. 05Details and treesThe long listing with ls -l, combining flags, and tree.Open

Unit 2

Files & folders

Make, write, copy, move, delete and read files.

  1. 06Make folders and filesmkdir, mkdir -p and touch.Open
  2. 07Put words in a fileecho, double quotes, > to write into a file, and cat to read it.Open
  3. 08Copy and movecp, cp -r for folders, and mv to rename and to move.Open
  4. 09Delete files and foldersrm, rm -r and rmdir, and why there's no undo.Open
  5. 10WildcardsMatch many files at once with * and ?, and what they skip.Open
  6. 11Delete safelyPreview before rm, -- and ./ for odd names, cp -n so nothing is overwritten.Open
  7. 12Read longer fileshead and tail for the start and end of a file, and less to scroll.Open

Unit 3

Searching

Search inside files with grep, find files by name, and count.

Pro
  1. Search inside files with grepgrep, and its flags -i, -n and -v.Pro
  2. Count matches and search foldersgrep -c to count, grep -r and . to search a whole folder.Pro
  3. Find files by namefind with -name and -type.Pro
  4. Count with wcCount lines, words and bytes with wc.Pro

Unit 4

Pipes & redirects

Send output into files, chain commands, and read the help.

Pro
  1. Redirects>> to add to a file, 2> for error messages, and /dev/null.Pro
  2. PipesConnect commands with |, so one command's output feeds the next.Pro
  3. Chain commands and check exit codes; to run one after another, exit codes and $?, && and ||.Pro
  4. Get helpRead a command's --help, search it with grep, and find your way around man pages.Pro
  5. Both streams, and tee2>&1 and &> to capture everything; tee to save and see at once.Pro
  6. Sort and countsort, sort -n, sort -r, uniq and uniq -c.Pro
  7. Cut out columnscut -f to pick columns, cut -d to say what separates them.Pro

Unit 5

Git basics

Track a project's history: status, add, commit, log, diff and undo.

Pro
  1. Start tracking with gitgit init, git status, git add and the short status.Pro
  2. Your first commitgit add ., git diff --staged, git commit -m and git log --oneline.Pro
  3. Keep secrets out of git.gitignore with single quotes, git check-ignore, git rm --cached and git log -S.Pro
  4. Read the historygit log, git diff, git show, HEAD and HEAD~1, --name-only.Pro
  5. Undo changesgit restore, git restore --staged, and git commit -a.Pro

Unit 6

Supervising an AI coding agent

Spot dangerous commands, review what an agent changed, and undo its mistakes.

Pro
  1. Spot the dangerous commandRead an agent's plan before you approve it: unset variables, rm -rf, curl | sh, > vs >>.Pro
  2. Review what the agent changedgit status -s, git diff --stat and git diff on one file.Pro
  3. When the agent commits for youRanges: main..HEAD, --format=%s, main...HEAD and git show --stat.Pro
  4. Undo the agent's mistakesrestore what you need, git revert, git reset --soft, and why not --hard.Pro

Unit 7

Permissions & scripts

Read ls -l, change modes with chmod, and write and run your own scripts.

Pro
  1. Read permissionsWhat the first column of ls -l means, ls -ld, and who root is.Pro
  2. chmod with numbersSet permissions with numbers like 644 and 600; sudo and redirects.Pro
  3. chmod with lettersChange just one permission (go-w, u+x), whole folders with -R, and ls -lR.Pro
  4. Run scriptsbash file, ./script, the shebang line, and chmod +x.Pro
  5. Write your own scriptsWrite a file of several lines with a here-doc, and use $1, the first argument.Pro

Unit 8

Text processing

Find and replace with sed, work with columns in awk, reshape text with tr and paste.

Pro
  1. sed: find and replacesed 's/old/new/', g for every match, -i to change the file, -i.bak to keep a backup.Pro
  2. sed: pick and delete linessed -n 'Np', previews with s///p, deleting lines, and the patterns ^, .*, $ and \.Pro
  3. awk: print columnsawk '{print $4}', several fields at once, and -F for commas.Pro
  4. awk: filter and add upConditions like $3 >= 6 and NR > 1, maths in print, and totals with += and END.Pro
  5. Feed files in with <, and tr< for input, tr to swap characters, tr -d to delete, tr -s to squeeze.Pro
  6. paste, and sorting by a columnpaste files side by side, paste -d and -s, sort -k and -t.Pro

Unit 9

Environment & control

Variables, the environment, PATH, aliases, processes and SSH keys.

Pro
  1. Shell variablesSet a variable with NAME=value, read it with $NAME, and quote it.Pro
  2. The environmentexport for programs and scripts, env to list, unset to remove.Pro
  3. PATH and commandsHow the shell finds commands: PATH, which, type, and aliases.Pro
  4. Processes and SSH keysps aux, kill and kill -9, Ctrl-Z and bg, ssh and its keys.Pro

Unit 10

Shell scripting

Arguments, if, loops, functions, and scripts that fail safely.

Pro
  1. Script arguments$1 and friends, $# to count them, "$@" and "$*" for all of them.Pro
  2. Decisions with ifTests with [ ], -f and -d, comparing text with =, then if and else.Pro
  3. More testsCompare numbers with -lt, -le and -gt; -z for empty; elif; and [[ ]].Pro
  4. for loopsDo the same thing for every file, and quote "$f".Pro
  5. while loops and functionsArithmetic with $(( )), while loops with a counter, and your own functions.Pro
  6. Scripts that fail safelybash -c, set -euo pipefail, VAR=value for one command, ${VAR:?}, $( ) and mktemp.Pro

Unit 11

Finding & bulk actions

Sharper find, acting on what it finds, and regular expressions with grep.

Pro
  1. Sharper find-iname, -mtime, -not and -maxdepth.Pro
  2. Act on what find finds-exec … {} \; once per file, -exec … {} + all at once, and -delete.Pro
  3. xargs and grep -lTurn a list into arguments with xargs, list matching files with grep -l, and handle spaces.Pro
  4. Regular expressions with grep[0-9] classes, grep -o, -E with {4} and |, and grep -w.Pro

Unit 12

Git branches & merging

Work on branches, merge them, and resolve conflicts.

Pro
  1. BranchesList, create, switch to and delete branches.Pro
  2. Merginggit merge, fast-forward vs merge commit, --no-ff, -m and --ff-only.Pro
  3. Merge conflictsRead conflict markers, rewrite the file with printf, git diff --check, finish or abort.Pro

Unit 13

Git history & undo

Reset modes, clean commits, the stash, cherry-pick and the reflog.

Pro
  1. reset --soft, --mixed, --hardMove a branch back and choose what happens to the changes.Pro
  2. Commits a reviewer can readGood messages, git commit --amend, and splitting a commit in two.Pro
  3. The stashPut unfinished work aside with git stash, label it, list it, and bring it back.Pro
  4. Copy one commit: cherry-pickgit cherry-pick a commit from another branch, and continue after a conflict.Pro
  5. The reflog remembersgit reflog, HEAD@{1}, and getting lost commits back with git reset --keep.Pro

Unit 14

Working with remotes (simulated)

Clone, fetch, push and pull, and force-push safely.

Pro
  1. Clone and fetchgit clone, git remote -v, git fetch, origin/main and tracking branches.Pro
  2. Push and pullgit push -u, git pull --ff-only, and pull --no-rebase when both sides moved.Pro
  3. Force-push safely--force-with-lease, git rev-parse, and pinning the lease to the commit you reviewed.Pro

Unit 15

Logs & data on the command line

Slice log files and read JSON with jq.

Pro
  1. Read a log fileLog fields, counting, top-N pipelines, time windows and sort -u.Pro
  2. JSON with jqjq '.', .field, -r for plain text, and .[] for every item of a list.Pro
  3. Filter JSON with jqPipes inside jq, select(...) to keep some items, length, and [ ] to collect.Pro

Unit 16

Capstone: supervising an AI agent

Run the full review gate, limit what an agent may do alone, and recover from a bad session.

Pro
  1. The review gateEvery commit, the combined change, leftovers, secrets, undo, tests, push the branch.Pro
  2. What an agent may do aloneLeast privilege: read-only auto-approval, no --no-verify, disposable checkouts, no production keys.Pro
  3. Recover from an agent's mistakesUse the reflog to undo a destructive session, safely, and refuse "cleanups" mid-recovery.Pro