promptgarten ๐ŸŒฑ
๐ŸŒ ES
Guideโ—โ—‹โ—‹4 min ยท +20 XP

Terminal Basics for Beginners

A terminal is just a window for typing commands instead of clicking. AI coding tools like Claude Code live there - a little terminal knowledge goes a long way.

What a terminal actually is

A terminal is a window where you type commands instead of clicking icons. You type a line of text, press Enter, and the computer does exactly that - no menus, no mouse. It looks intimidating at first, but it's really just a very direct way to talk to your computer.

Opening it

On a Mac, press Cmd+Space to open Spotlight, type "Terminal", and press Enter - or use Launchpad or Finder โ†’ Applications โ†’ Utilities โ†’ Terminal (the path Apple's guide documents). On Windows, press Win+X and choose Windows PowerShell (or Terminal) from the menu.

A handful of commands to start with

  • pwd - shows which folder you're currently in
  • ls (Mac/Linux) or dir (Windows) - lists what's in the current folder
  • cd foldername - moves into a folder, cd .. moves back up
  • mkdir name - creates a new folder
  • touch name (Mac/Linux) - creates an empty file
  • rm name - deletes a file (careful, there's no trash bin here)
  • cp source target - copies a file
  • clear - wipes the screen so you can start fresh

Why AI coding tools live here

Tools like Claude Code or Codex CLI run as terminal programs. You start them by typing one command in a project folder, and everything they do - reading files, running tests, installing packages - happens through the same commands you just learned. Knowing the terminal even a little makes it much easier to understand what an AI agent is actually doing.

EXAMPLE

$ pwd /Users/you/projects/my-app $ ls README.md package.json src $ cd src $ mkdir utils $ ls utils

๐Ÿ› ๏ธ EXERCISE โ€” TRY IT YOURSELF

Open a terminal and navigate through your file system using only commands - no clicking.

  1. Open your terminal (Terminal on Mac, Windows Terminal or PowerShell on Windows).
  2. Type `pwd` and press Enter to see where you are.
  3. Create a new folder with `mkdir test-folder`, then move into it with `cd test-folder`.
  4. Create an empty file inside it (`touch note.txt` on Mac/Linux, or `type nul > note.txt` on Windows).
  5. Move back up with `cd ..` and list the contents with `ls` (or `dir`) to confirm your folder is there.

โœ… SELF-CHECK

  • โ˜ Could you switch between folders without using the mouse?
  • โ˜ Did you understand the difference between `ls`/`dir` and `pwd`?
  • โ˜ Do you know why an AI agent sees the same exit code as you when a command fails?

QUICK QUIZ

What does the command `cd ..` do?

SOURCES

RELATED TOPICS

Installing Claude Code (Step by Step) โ—โ—‹โ—‹Claude Code: Anthropic's CLI Agent โ—โ—โ—‹Git & GitHub for Vibe Coders โ—โ—‹โ—‹Vibe Coding: When It Works, When It Bites You โ—โ—‹โ—‹