Lesson 1 of 7 in Basics

How this works

Story: Before your first case, the Archivist wants you at home in the terminal.

Every Lesson has two halves. On the left you read the Lesson and get your Challenges. On the right, the Live Graph sits above the Terminal.

The Terminal

The Terminal is a simulated command line. Nothing you type reaches your real computer: commands change files in a Virtual Filesystem that lives in your browser. Your home folder is ~, which is short for /home/learner.

Before you meet git, you need a few Shell Commands to move around and change files:

Command What it does
pwd Prints the folder you are in.
ls Lists the files and folders here. ls <folder> lists another folder.
cd <folder> Moves into a folder. cd .. moves up one folder, and cd on its own goes home.
cat <file> Prints a file.
echo "text" > <file> Writes a line to a file, replacing what was in it.
echo "text" >> <file> Adds the text, then a line break, to the end of a file.
mkdir <folder> Makes a folder.
edit <file> Opens a file in the edit pane. Saving creates the file, and any missing folders, if needed.
help Lists every command you can use right now.

A path can go through several folders at once: cd projects/website goes into projects, then into website.

>> adds right after the last character in the file. The edit pane saves exactly what you type, so if the last line you typed there has no Enter after it, the next >> carries on along that line. Press Enter after the last line to start the next one fresh.

The Terminal has no pipes (|), no && and no variables. A command that goes wrong prints an error, as it would on your own computer. When the Terminal refuses a command because it doesn't support it, or because a later Lesson teaches it, it says so in a Terminal Notice: a muted line that starts with ⓘ. A Notice never changes anything.

The Live Graph

Once you are in a git repository, the Live Graph draws its history. Each circle is a commit, and labels such as main are branches. It updates after every command. This Lesson uses no git, so the graph has nothing to draw yet. The Explainer shows what it looks like.

Challenges and Par

Each Challenge gives you a task and a checklist. The checklist ticks as you work, and the Challenge is complete as soon as every item holds. It doesn't matter which commands get you there.

Par is the number of commands that change something: a file, a folder, the folder you're in, or a repository. Commands that only look, such as ls, cat and pwd, are free. Finish at or under Par for bonus XP.

Stuck? Hints are free, and you can reveal them one at a time. Once you've seen every hint, the Walkthrough replays a solution in the Live Graph, but finishing after it earns no Par bonus. Restart puts everything back the way the Challenge started.

Explainer: The Terminal and the Live Graph

project: your repo, you are here37d7cf7 Add a README37d7cf7ab89288 Add the home pageab89288a4b8d97 Style the headinga4b8d97eca1a5b Add contact detailseca1a5bHEAD → main
The repository at the end of the Explainer.
Graph as text

project: your repo, you are here

  • HEAD → main at eca1a5b "Add contact details"

Branches and tags

  • main at eca1a5b "Add contact details"

Commits, newest first

  1. eca1a5b "Add contact details"; parent a4b8d97; refs: HEAD → main
  2. a4b8d97 "Style the heading"; parent ab89288
  3. ab89288 "Add the home page"; parent 37d7cf7
  4. 37d7cf7 "Add a README"; no parent

Challenge 1 of 3

Story: Your desk files arrived in a heap of folders, Agent. I need the website ones.

Somewhere in your home folder is a folder called website. Go into it.

Commands 0 of Par 1

Goal

  • Met: The files under ~ match the goal
  • Not met yet: The Terminal is in ~/projects/website
  • Not met yet: The Terminal is in the website folder

Hints

Live Graph

No repository to show yet.

Terminal

~ $