Terminal basics: files, folders, and commands · Lesson 1 of 6

Lesson 1: Open the terminal and read the prompt

Lesson objectives:

  • Name the two programs involved: the terminal app and the shell.
  • Read a prompt and know when the shell is ready for a command.
  • Run a command by typing it and pressing Return.

Prerequisites: None | Previous << README | Next 02 >>

Where is the "Start" button?

If you have only used a computer by clicking icons and menus, the terminal can look like a black screen full of code. It isn't. The terminal is just another app — a text-based window where you type instructions and the computer types answers back 12.

Inside the terminal runs another program called the shell. The shell reads what you type, asks the computer to do it, and shows you the result 23. You can think of the terminal as the telephone and the shell as the person on the other end who listens and replies.

When the shell is ready, it prints a prompt. The prompt is the short line of text that sits in front of your cursor, often ending in $ or %. It means "I'm listening. Type your command" 4.

The diagram shows the loop: you type, the shell interprets, the computer acts, and the shell shows a new prompt when it is ready.

Worked example (follow along)

  1. Open your terminal app:
    • macOS: Press Cmd + Space, type Terminal, and press Return.
    • Linux: Press Ctrl + Alt + T or search for "Terminal" in your apps.
    • Windows: Open Windows Terminal or Git Bash from the Start menu.
  2. You will see a window with a few lines of text and a prompt ending in $ or %.
  3. Type the command date exactly as shown, then press Return.
  4. The terminal prints today's date and time, then a new prompt appears.
text
$ dateFri Jul 17 09:00:00 +08 2026$

The word date is the command. The line below it is the output. The final $ is the next prompt, telling you the shell is ready again.

Your turn (faded example)

Fill in the missing word in the command below to print the current date and time:

text
$ ____Fri Jul 17 09:00:00 +08 2026$

Answer: date

Summary + what's next

You now know that the terminal is an app, the shell is the program inside it that reads what you type, and the prompt is the shell's way of saying "I'm ready." You also ran your first command. In Lesson 2, you will learn where you are in the file system and how to move around.

Footnotes

  1. Apple Terminal User Guide: Get started with Terminal on Mac — https://support.apple.com/guide/terminal/get-started-pht23b129fed/mac

  2. MIT Missing Semester: Course Overview + Introduction to the Shell — https://missing.csail.mit.edu/2026/course-shell/ 2

  3. GNU Bash Manual — https://www.gnu.org/software/bash/manual/

  4. UC Berkeley SCF: Using the bash (and zsh) shell — https://computing.stat.berkeley.edu/tutorial-using-bash/

Exercises

01

Open your terminal and run the date command. Then run the whoami command. Write down what each one prints.

Level 1 (warm-up)
Done criteria · checked locally
02

Run the echo hello command. Then try echo hello, my name is [your name]. Notice how the shell prints back exactly what you put after echo.

Level 2 (advanced)
Done criteria · checked locally