# Terminal for Complete Beginners

A practical guide to understanding and using the Terminal — written for someone who has never typed a command before.

---

## Table of Contents

1. [The Big Picture](#the-big-picture)
2. [Key Terms (Plain English)](#key-terms-plain-english)
3. [Setting Up](#setting-up)
4. [Your First Commands](#your-first-commands)
5. [Moving Around](#moving-around)
6. [Looking at Files](#looking-at-files)
7. [Making and Changing Things](#making-and-changing-things)
8. [How a Command Is Built](#how-a-command-is-built)
9. [The Path to GitHub](#the-path-to-github)
10. [Dangerous Commands (Read This)](#dangerous-commands-read-this)
11. [When Things Look Broken](#when-things-look-broken)
12. [Terminal vs. Other Tools](#terminal-vs-other-tools)
13. [Common Mistakes and How to Avoid Them](#common-mistakes-and-how-to-avoid-them)
14. [Quick Reference Cheat Sheet](#quick-reference-cheat-sheet)
15. [Glossary](#glossary)

---

## The Big Picture

### What problem does the Terminal solve?

Apps give you buttons. The Terminal gives you a **text box that talks to your computer**. You type a short instruction, press Return, and the computer does that one thing — then waits for the next one.

You do not need it for email or Netflix. You need it when you want to:

- **Go to a folder** without clicking through Finder
- **Run Git** so you can save and push work (see the [GitHub 101](https://goaspi.com/101/github/))
- **Install or run tools** that only have a command, not a pretty app
- **See exactly what happened** — the output is text you can copy

If Cursor or GitHub Desktop ever shows a black box with a blinking cursor, that *is* a terminal. Same idea, different window.

### The texting analogy

| Real world | Terminal equivalent |
|---|---|
| Opening Messages and texting a friend | Opening Terminal and typing a command |
| Your friend reads the text, does the thing, texts back | The computer runs the command and prints a reply |
| You send one message at a time | You run one command at a time (usually) |
| A wrong text can be awkward | A wrong command can delete files — go slow |
| “Where are you?” | `pwd` (where am I in the folders?) |
| “What’s in that drawer?” | `ls` (list what’s here) |
| “Walk into the kitchen” | `cd Kitchen` (change directory) |

### What makes the Terminal different

1. **It is precise.** Buttons hide details. A command is the exact instruction.
2. **It is repeatable.** The same line does the same job tomorrow.
3. **It is unforgiving of typos.** `cd Docments` fails. The computer will not guess.
4. **It starts wherever it starts.** Until you `cd`, you may not be in the folder you think.
5. **You cannot break the internet from here.** You *can* delete files in the folder you are in. That is the main risk.

---

## Key Terms (Plain English)

### Terminal
The app (window) where you type commands. On a Mac it is **Terminal**. In Cursor it is the panel at the bottom. Same idea.

### Shell
The program *inside* the window that reads what you type. On most Macs it is **zsh**. You do not need to pick one as a beginner.

### Command
A word the shell knows, like `ls` or `cd`. Often followed by extra words (arguments) and options (flags).

### Prompt
The bit of text *before* your cursor — often a folder name and a `$` or `%`. It means: “I am ready. Type here.”

### Directory
A folder. Terminal people say “directory.” Same thing.

### Path
The address of a folder or file. `~/Documents/TestBot` is a path.

### Working directory
The folder the Terminal is “standing in” right now. Commands like `ls` look *here* unless you say otherwise.

### Argument
The extra thing you hand a command. In `cd Documents`, `Documents` is the argument.

### Flag / option
A switch, usually starting with `-`. `ls -a` means “list, and include hidden files.”

### Home directory
Your user folder. Shortcut: `~`. On a Mac that is usually `/Users/yourname`.

---

## Setting Up

### On a Mac (most people here)

1. Open **Spotlight**: press `Command + Space`.
2. Type `Terminal` and press Return.
3. A window appears with a prompt and a blinking cursor. You are in.

Pin it to the Dock if you will use it often: right-click the icon → **Options** → **Keep in Dock**.

### Inside Cursor

**Terminal → New Terminal** (or `` Control + ` ``). You get a terminal *in the project you have open*. That is usually better than the standalone app once you are working on a guide or a repo.

### On Windows

Use **PowerShell** or **Git Bash** (installed with [Git](https://git-scm.com)). The *ideas* in this guide are the same. A few command names differ (`ls` vs `dir`). If you are on Windows and following the GitHub 101, Git Bash is the friendliest match.

### You do not need to “install the Terminal”

It is already on the Mac. You may later install **Git** (the GitHub guide covers that). That is a program the Terminal *runs*, not a second Terminal.

---

## Your First Commands

Type these exactly. Press **Return** after each line. Read the reply before typing the next one.

```bash
pwd
```

**Print working directory** — “Where am I?” You should see a path like `/Users/yourname`.

```bash
ls
```

**List** — “What is in this folder?” Names of files and folders.

```bash
whoami
```

**Who am I?** — Your short username. Harmless. Confidence builder.

```bash
date
```

Today’s date and time. Also harmless.

If you see `command not found`, you typed it wrong. Try again. Nothing is broken.

### Cancel a command

If something is running and you want out: **Control + C**. That does not close the window. It stops the current command.

### Clear the screen

```bash
clear
```

Or press **Control + L**. Your history is still there if you scroll up.

---

## Moving Around

This is 80% of beginner Terminal use: **know where you are, then go somewhere**.

### See where you are

```bash
pwd
```

### List what’s here

```bash
ls
ls -la
```

`-l` is a long list (sizes, dates). `-a` includes hidden files (names that start with `.`).

### Go into a folder

```bash
cd Documents
```

`cd` = **change directory**. The name is case-sensitive. `documents` is not `Documents`.

### Go up one folder

```bash
cd ..
```

`..` means “the parent.” You can chain: `cd ../..` goes up twice.

### Go home

```bash
cd ~
```

or just:

```bash
cd
```

### Tab completion

Type the first few letters of a folder name and press **Tab**. The Terminal finishes the name if it is unique. Use this. It prevents typos.

### Drag a folder from Finder

You can type `cd ` (with a space) then drag a folder onto the Terminal window. It pastes the full path. Press Return.

---

## Looking at Files

```bash
ls
```

See names.

```bash
ls *.md
```

Only Markdown files in this folder. `*` means “any characters.”

```bash
cat README.md
```

Print the whole file in the window. Fine for short files. Messy for huge ones.

```bash
open .
```

On a Mac: open *this* folder in Finder. Very useful when you get lost.

```bash
open README.md
```

Open that file in the default app (often TextEdit or your editor).

You do not need to edit novels in the Terminal. Use [Cursor](https://goaspi.com/101/cursor/) or any editor. Use the Terminal to *get there* and *run Git*.

---

## Making and Changing Things

### Make a folder

```bash
mkdir practice-folder
cd practice-folder
```

### Make an empty file

```bash
touch notes.md
```

`touch` creates the file if it does not exist. If it exists, it just updates the timestamp.

### Copy a file

```bash
cp notes.md notes-backup.md
```

### Rename or move

```bash
mv notes.md inbox.md
```

`mv` is rename if you stay in the same folder, move if you give a different folder.

### Delete a file (permanent)

```bash
rm notes-backup.md
```

There is **no Trash**. `rm` is gone. Do not `rm` anything you have not listed with `ls` first.

### Delete an empty folder

```bash
rmdir practice-folder
```

Only works if the folder is empty. To remove a folder *and* its contents you need `rm -r` — see the danger section.

---

## How a Command Is Built

Most commands look like this:

```text
command  -flags  arguments
```

Examples:

| You type | Meaning |
|---|---|
| `ls` | List here |
| `ls -la` | List here, long + hidden |
| `cd Documents` | Go into Documents |
| `git status` | Run the `git` program, `status` action |
| `git commit -m "Fix typo"` | Git, commit, message flag, the message |

**Spaces matter.** `cd My Folder` looks like two arguments. If a name has a space, wrap it:

```bash
cd "My Folder"
```

or escape the space:

```bash
cd My\ Folder
```

Quotes are easier.

### What success looks like

Many commands print **nothing** when they work. `cd` and `mkdir` are like that. No news is good news. Then run `pwd` or `ls` to confirm.

---

## The Path to GitHub

You do not need every Git command today. You need to be *in the right folder* so the [GitHub 101](https://goaspi.com/101/github/) commands work.

Typical loop:

```bash
cd ~/Documents/TestBot
pwd
ls
git status
```

If `git status` says `not a git repository`, you are in the wrong folder — or the project was never set up as a repo. `cd` until `pwd` matches the project, or follow the GitHub guide to `clone` / `init`.

The daily Git words (`add`, `commit`, `push`, `pull`) live in the GitHub guide. The Terminal’s job is: **stand in the project, then type those words**.

---

## Dangerous Commands (Read This)

These are the ones that hurt beginners.

| Command | Why it is dangerous | Safer habit |
|---|---|---|
| `rm file` | Deletes forever | `ls` first; prefer Finder Trash while learning |
| `rm -r folder` | Deletes the folder and everything inside | Never copy this from a random website |
| `rm -rf /` | Can wipe the machine | Never type this. Ever. |
| `sudo` | Runs as the administrator | You almost never need this for Git or these guides |
| Pasting a long mystery block | You do not know what it does | Read it. If you do not understand it, do not run it. |

**Rule:** If a command contains `rm`, `sudo`, or a path you do not recognize, stop. Ask someone (or the [Cursor](https://goaspi.com/101/cursor/) agent) to explain it in plain English first.

---

## When Things Look Broken

### `command not found`

Typo, or the program is not installed. Check spelling. For Git: `git --version`. If that fails, install Git from the GitHub 101.

### `No such file or directory`

Wrong name or wrong folder. Run `pwd` and `ls`. Use Tab completion.

### `Permission denied`

The file is locked or you need a different user. Do not jump to `sudo`. Check you are in *your* folder (`~`), not someone else’s.

### The prompt looks weird or a `>` sits there

You probably opened a quote and never closed it. Press **Control + C** and start the line again.

### You are “stuck” in `vim` or `nano`

You opened a terminal text editor by accident. For `nano`: **Control + X**, then `n` if it asks to save. For `vim`: type `:q!` and press Return. Then use Cursor to edit files instead.

### The computer says the command is running and nothing happens

**Control + C**. Then `pwd`.

---

## Terminal vs. Other Tools

| Feature | Terminal | Finder / Explorer | GitHub Desktop | Cursor |
|---|---|---|---|---|
| **See files** | `ls` | Click folders | Project view | File sidebar |
| **Move around** | `cd` | Click | Opens a repo | Opens a folder |
| **Run Git** | Full power | No | Buttons for common Git | Agent + built-in terminal |
| **Learn what happened** | Text output | Little detail | Some logs | Chat + terminal |
| **Risk of delete** | High if you `rm` | Trash (recoverable) | Low | Agent can edit many files — review them |
| **Best for** | Exact commands, Git, scripts | Everyday files | Git without typing | Building + asking an agent |

**Use Finder** to browse and trash safely.  
**Use Terminal** when a guide says “run this.”  
**Use GitHub Desktop** if Git-in-the-terminal still feels like too much.  
**Use Cursor** when you want an agent to help — it has a terminal inside it.

---

## Common Mistakes and How to Avoid Them

| Mistake | Why it is a problem | Better approach |
|---|---|---|
| Skipping `pwd` | You run Git or `rm` in the wrong place | `pwd` then `ls` before anything important |
| Ignoring case | `cd documents` fails on a Mac | Tab complete |
| Spaces without quotes | `cd My Project` breaks | `cd "My Project"` |
| Fear of “no output” | You retry and duplicate work | Check with `ls` / `git status` |
| Pasting Stack Overflow blindly | Hidden `rm` or `sudo` | Read every line |
| Using `sudo` to “make it work” | Breaks permissions later | Fix the path or install properly |
| Closing the window in a panic | You lose the scrollback, not the computer | Control + C, then keep the window |
| Trying to learn all of Bash | Overwhelm | Learn `pwd`, `ls`, `cd`, then Git |

---

## Quick Reference Cheat Sheet

| I want to… | Type |
|---|---|
| See where I am | `pwd` |
| List files | `ls` or `ls -la` |
| Go home | `cd ~` |
| Go into a folder | `cd FolderName` |
| Go up one folder | `cd ..` |
| Open this folder in Finder (Mac) | `open .` |
| Make a folder | `mkdir name` |
| Make a file | `touch name.md` |
| Read a short file | `cat name.md` |
| Stop a running command | **Control + C** |
| Clear the screen | `clear` |
| See if Git works | `git --version` |
| See Git status (in a repo) | `git status` |
| Autocomplete a name | Type a few letters, press **Tab** |

More Git: [GitHub for Complete Beginners](https://goaspi.com/101/github/).  
The editor that sits next to this: [Cursor for Complete Beginners](https://goaspi.com/101/cursor/).

---

## Glossary

| Term | Meaning |
|---|---|
| **Terminal** | The window where you type commands |
| **Shell** | The program that interprets those commands (often zsh) |
| **Prompt** | The ready-to-type line (`%` or `$`) |
| **Command** | An instruction like `ls` or `git` |
| **Directory** | A folder |
| **Path** | The address of a file or folder |
| **`~`** | Your home folder |
| **`.`** | This folder |
| **`..`** | The folder above this one |
| **Argument** | The target you give a command |
| **Flag** | An option, usually `-a` or `--long` |
| **`rm`** | Delete — no Trash |
| **`sudo`** | Run as administrator — avoid as a beginner |
| **Control + C** | Cancel the current command |

---

You only need **`pwd` → `ls` → `cd`** to stop being lost. Everything else — including Git — builds on standing in the right folder.

More Aspi 101: [GitHub](https://goaspi.com/101/github/) · [Cursor](https://goaspi.com/101/cursor/) · [Markdown](https://goaspi.com/101/markdown/) · [All 101 Guides](https://goaspi.com/101/).
