Back to Learning Area

The Terminal

An introductory conversation with the tool many consider outdated — and nobody has truly replaced.

  • Fundamentals
  • 13 min
  • Beginner

Plain Language

This preview is in Plain Language. The whole portal is also available in Plain Language. You can change the language at the top. Or use the button below. Our Plain Language texts are AI-assisted and editorially reviewed. They follow the core principles of easy-to-read language, but they are not certified Easy Read: a review panel of people with learning difficulties does not test them.

Preview: Controlling the computer with text

What is the terminal?

The terminal is a text window. You type commands. The computer executes them immediately. This way, you can control everything. For example: copying files or creating folders.

File paths: the address of a file

Every file has an address. This address is called a path. A path shows where the file lies. For example: /home/user/project/file.txt.

Important commands

There are nine basic commands. pwd shows where you are. ls shows files in the folder. rm deletes files immediately and permanently. Deleted files are gone.

Behind every app, every website, and every AI chatbot lies a world of text commands that make everything work. This article introduces the terminal — the text-based interface that professionals use to control computers with surgical precision.

No prior experience required: by the end, you will understand why both visual and text interfaces exist, how file addresses work, and you will know enough commands to build your first project folder from scratch.

Two Ways to Talk to Your Computer — GUI vs. CLI

Definition

GUI, CLI, Terminal & Shell

Analogy

Imagine navigating a city. A GUI is like a map with landmarks — you tap on places and get guided there. Intuitive and visual, but you can only go where the map shows you. A CLI is like giving a taxi driver a precise street address — you need to know the address, but you can reach any destination, describe complex routes, and give the same instructions to a hundred taxis at once.

The map-vs.-address analogy has limits: a typo in an address sends you to the wrong place, but a typo in a command like rm -rf /* can destroy your entire system. Also, a GUI deliberately hides advanced functionality behind menus, while a CLI makes every function equally direct to reach — provided you know its name.

Historical context: Unix shells emerged in the late 1960s and early 1970s. Graphical interfaces only went mainstream in the 1980s (Macintosh 1984, Windows 1985). Many GUIs were built ON TOP of existing CLI systems — the terminal was there first.

Concrete example: renaming 500 photos from IMG_0001.jpg to vacation_001.jpg. File managers like Explorer or Finder can rename many files at once, but only with the patterns their menu offers; if your scheme does not fit, you click through every single file — tedious for 500 files. In a CLI, a single line renames all of them in seconds — that is the automation advantage: for f in IMG_*.jpg; do mv "$f" "vacation_${f#IMG_0}"; done

GUI — Graphical Interface

Visual and intuitive. Easy to discover, undo available. Great for image editing, web design, and casual use. Higher resource usage, hard to automate.

CLI — Command Line

Precise and repeatable. Scriptable, remote-capable, low resource usage. Great for automation, server management, and development. Requires learned vocabulary, no visual feedback.

Note

Which Terminal to Use?

macOS and Linux: The built-in Terminal is ready to go. Windows: Use WSL (Windows Subsystem for Linux) for a full Unix environment, most conveniently inside Windows Terminal – the commands here are Unix commands, and the default shell, PowerShell, does not know all of them (touch, for example). Tip: Most code editors like VS Code have an integrated terminal — you can start right there.

Caution

The Terminal Has No Undo

Unlike graphical programs, the terminal has no "Undo" button and no recycle bin. When you execute a command, it takes effect immediately. Start with safe, read-only commands like pwd, ls, and cat before modifying or deleting files.

Paths — Where Am I? Where Do I Want to Go?

Definition

Absolute Path, Relative Path & Working Directory

Analogy

A file system is like an office building. The absolute path is the full postal address (Building, Floor 3, Room 312, Desk 2). The relative path is directions from where you are now ("go one door to the left"). The working directory is the room you are currently standing in.

The office building analogy has limits: file systems can contain symbolic links (symlinks) that act like teleporters — stepping through a door lands you in a completely different part of the building. Also, the root directory / has no "floor above" — cd .. from / stays at /.

Platform differences: Unix uses / as the path separator, Windows uses \. Case sensitivity also differs — Linux is case-sensitive, macOS and Windows are not by default. On Windows, though, most modern tools accept / as well.

Note

Navigation Exercise: Step by Step

  1. 1. pwd → Shows /home/user — now you know where you are
  2. 2. mkdir project → Creates a new folder called "project"
  3. 3. cd project → Moves into the folder. pwd now shows /home/user/project
  4. 4. mkdir data src → Creates two subfolders at once
  5. 5. cd data → Moves to /home/user/project/data
  6. 6. cd .. → Goes one level back to /home/user/project

Caution

Common Path Pitfalls

Spaces in path names require quotes: cd "My Folder". Never lose track of your working directory — use pwd frequently. Don't confuse absolute and relative paths: /data/file.csv is something entirely different from data/file.csv.

Your First Commands — The Starter Toolkit

These 9 commands are like learning 9 words in a foreign language before a trip: you won't be fluent, but you can ask where you are, get going, look around, build a shelf, leave a note, read a note, photocopy a document, move boxes, and shred a document. Nine words, and you can handle most daily situations.

pwd Shows the current directory
ls Lists the contents of a folder
cd Changes to a different folder
mkdir Creates a new folder
touch Creates an empty file
cat Displays the contents of a file
cp Copies files or folders
mv Moves or renames
rm Deletes files permanently

Tab completion is your best friend: type the first few letters of a file or folder name and press Tab — the shell completes the name automatically. This prevents typos, speeds up input, and shows you what files and commands are available.

Note

Mini Project: Build an AI Project Folder

  1. 1. mkdir ai-project → Creates the main folder
  2. 2. cd ai-project → Moves into it
  3. 3. mkdir data src docs → Creates three subfolders
  4. 4. touch requirements.txt README.md → Creates two empty files
  5. 5. ls → Shows the folders data, docs, src and the files requirements.txt, README.md
  6. 6. cp requirements.txt requirements-backup.txt → Creates a backup copy
  7. 7. mv README.md docs/ → Moves README.md into the docs folder

Caution

Danger Zone: rm Deletes Permanently

The rm command has no recycle bin. What you delete is gone — no confirmation, no undo. The command rm -rf can wipe entire directory trees in seconds.

Tip: Use rm -i to get a confirmation prompt before each deletion. Always check with pwd and ls that you are in the correct directory before using rm.

In the next article you will set up your development environment — the place where these commands, your code and soon Git come together.

Interactive: Command Flashcards

Test your knowledge of the most important terminal commands. Click a card to reveal the explanation with syntax and example. Shuffle the deck and try to describe each command from memory before flipping.

Card 1 of 8
Term

pwd

Where am I right now?

Click to flip
Explanation

Prints the absolute path of your current working directory. Essential for orientation — especially before deleting or moving files.

Formula
pwd
→ /home/user/project
Example

Always check pwd before rm so you don't delete in the wrong folder.

Click to flip back

Commands accept flags (also called options) that modify their behavior. Short flags start with a single dash (-l), long flags with two (--long-name). You can combine short flags: ls -la shows hidden files and detailed information at the same time.

Example: ls without flags shows only file names. ls -l shows file size, permissions, and modification date. ls -a also shows hidden files (those starting with a dot, like .gitignore).

Most commands explain themselves: type --help after a command (e.g. ls --help on Linux) to see an overview of all options. On Unix/macOS, the command man ls shows the full documentation.

The terminal is not optional for professional AI work — it is the primary tool. Most GPU servers where AI models are trained have no graphical interface. You connect via SSH (Secure Shell) through the terminal.

You manage Python packages with pip, conda or uv in the terminal. Training runs are launched with commands like python train.py --epochs 50 --lr 0.001. CI/CD pipelines — automated testing and deployment processes — are built from the same command-line commands you type in the terminal. AI coding agents now work directly in the terminal too: tools like Claude Code or OpenAI's Codex CLI read your code, run commands and change files — if you know pwd, ls and rm, you understand what the agent is doing. If you want to work with AI professionally, there is no way around the terminal.

Note

Key Takeaways

  1. A GUI lets you point and click; a CLI lets you type precise, repeatable, scriptable instructions — both exist because they solve different problems.
  2. Every file on your computer has an address (path). Absolute paths start from the root (/ or C:\), relative paths start from wherever you currently are.
  3. Nine commands (pwd, ls, cd, mkdir, touch, cat, cp, mv, rm) cover most everyday file operations in the terminal.
  4. Tab completion prevents typos, speeds up input, and teaches you what files and commands exist.
  5. The terminal has no undo button and no trash can — rm deletes permanently. Always double-check your path before pressing Enter.

Check

Quiz: The Terminal

Not completed

What is the main difference between GUI and CLI?

Select one answer

Answer Key: 1) B · 2) B · 3) B · 4) B

Check

Checkpoint: Test Your Knowledge

Can you explain this in your own words? Tick what you've got.

0 of 3 done