learn git.
0/25 done
learn git/the basics/course 01 of 25

Meet the terminal

Before git, you need to be okay with the black window. It is friendlier than it looks.

5 min read·3 sections·2 tasks
the key idea

A terminal is just a place where you type commands instead of clicking buttons — nothing more magical than that.

01What a terminal actually is

Everything you normally do on a computer — opening files, creating folders, deleting things — you do by clicking. The terminal is the same computer, controlled by typing instead. That is the whole difference. There is no magic in the black window; it is a text-based remote control for your own machine.

The terminal shows you a prompt — a short line ending in a dollar sign, like ~/my-project $. That dollar sign is the terminal saying: I am awake, I am listening, type something. When you press Enter, the terminal reads your line, does the job, prints any answer, and shows you a fresh prompt again.

Why do programmers use it? Speed and precision. A command like ls is faster than opening a file manager, and — more importantly for this course — git is a terminal program. Every git skill in the world is typed, so being relaxed in a terminal is the foundation everything else stands on.

[bash]· the four commands this course uses
ls
cat notes.txt
echo "hello" > notes.txt
cat notes.txt
Commands are just verbs

Read a command out loud as a sentence: ls means list, cat notes.txt means show me what is inside notes.txt, rm old.txt means remove old.txt. Once you read them as verbs, they stop looking like code.

02The four moves you need today

echo "some text" > notes.txt is the writing move. Everything between the quotes becomes the content of the file. If the file did not exist, it is created on the spot; if it existed, its old content is replaced. One arrow means replace.

cat notes.txt is the reading move — it prints the file's content into the terminal so you can check what you wrote. ls is the looking-around move — it lists every file sitting in your current folder. And clear wipes the screen when it gets crowded, which is purely cosmetic and safe.

A second arrow, >>, means append instead of replace: echo "a second line" >> notes.txt adds to the end of the file without touching what is already there. Replace versus append — one arrow versus two — is a distinction that will follow you around this whole course.

[bash]· replace with one arrow, append with two
echo "one" > list.txt
echo "two" >> list.txt
cat list.txt
# one
# two
> erases without asking

echo "new" > notes.txt throws away the old content immediately. There is no undo and no confirmation dialog. If a file matters, cat it first and be sure.

03Mistakes are cheap here

Nothing you type in this course can damage your computer — the terminal below is a simulation running inside this page. Type the wrong thing and the worst that happens is a message like command not found. You read it, you retype, you move on.

That loop — type, read the reply, adjust — is the actual skill. People who look fluent in terminals are not typing perfectly; they are just comfortable reading the machine's answers. Slow is fine. Every expert was slow here once.

Feeling lost? Ask for help

Type help in the practice terminal below any time. It lists every command the simulator understands, so you always have a way forward.

>>

Practice

Warm up: make one file, then read it back.

[practice]· a real terminal, safely simulated
practice terminal — everything here is simulated, nothing can break
type 'help' to see the commands this terminal understands
~/my-project $
Your tasks0/2 done
  1. 01.Create a file called notes.txt with any text inside it.

    hint: Try: echo "hello" > notes.txt

  2. 02.Read the file back with cat.

    hint: Try: cat notes.txt