An introductory conversation with the tool many consider outdated — and nobody has truly replaced.
Fundamentals 13 min Beginner April 26, 2026
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
GUI, CLI, Terminal & Shell
AnalogyDefinition
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.
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.
Definition:
A GUI (Graphical User Interface) presents visual elements — windows, icons, menus, buttons — that you interact with via mouse and touch. A CLI (Command-Line Interface) presents a text prompt where you type commands and receive text output. The terminal is the program that provides the text window. The shell (e.g. Bash, Zsh, PowerShell) is the interpreter inside it that processes your commands.
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 exposes everything equally.
Historical context: Unix shells emerged in the late 1960s and 70s. Graphical interfaces arrived in the 1980s (Macintosh 1984, Windows 1985). 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. In a GUI, you would right-click each file individually — tedious for 500 files. In a CLI, a single line renames all of them in seconds. This illustrates the automation advantage.
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.
Which Terminal to Use?
macOS and Linux: The built-in Terminal is ready to go. Windows: Use Windows Terminal or WSL (Windows Subsystem for Linux) for a full Unix environment. Tip: Most code editors like VS Code have an integrated terminal — you can start right there.
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?
Absolute Path, Relative Path & Working Directory
AnalogyDefinition
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.
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.
Definition:
A path is the address of a file or folder in the hierarchical file system. An absolute path starts from the root (/ on Unix/macOS, C:\ on Windows) and specifies the complete route, e.g. /home/user/project/data.csv. A relative path starts from the current working directory. The shorthand . means "here" and .. means "one level up."
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. Most modern tools accept both separators.
Navigation Exercise: Step by Step
1
pwd → Shows /home/user — now you know where you are
2
mkdir project → Creates a new folder called "project"
3
cd project → Moves into the folder. pwd now shows /home/user/project
4
mkdir data src → Creates two subfolders at once
5
cd data → Moves to /home/user/project/data
6
cd .. → Goes one level back to /home/user/project
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 for directions, 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.
Mini Project: Build an AI Project Folder
1
mkdir ai-project → Creates the main folder
2
cd ai-project → Moves into it
3
mkdir data src docs → Creates three subfolders
4
touch requirements.txt README.md → Creates two empty files
5
ls → Shows: data/ docs/ src/ requirements.txt README.md
6
cp requirements.txt requirements-backup.txt → Creates a backup copy
7
mv README.md docs/ → Moves README.md into the docs folder
Danger Zone: rm Deletes Permanently
The rm command has no recycle bin. What you delete is gone — no confirmation, no recovery. 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 use these commands together with Git — and the terminal becomes your collaboration tool.
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
Deep Dive: Flags and Options — Teaching Commands New Tricks
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) to see an overview of all options. On Unix/macOS, man ls shows the full documentation.
Deep Dive: Why AI Practitioners Live in the Terminal
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 and conda 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 — run entirely in the terminal. If you want to work with AI professionally, there is no way around the terminal.
Key Takeaways
A GUI lets you point and click; a CLI lets you type precise, repeatable, scriptable instructions — both exist because they solve different problems.
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.
Nine commands (pwd, ls, cd, mkdir, touch, cat, cp, mv, rm) cover most everyday file operations in the terminal.
Tab completion prevents typos, speeds up input, and teaches you what files and commands exist.
The terminal has no undo button and no trash can — rm deletes permanently. Always double-check your path before pressing Enter.
Quiz: The Terminal
Question 1 / 4
Not completed
What is the main difference between GUI and CLI?
1. What is the main difference between GUI and CLI?
☐ A) A GUI is faster than a CLI
☐ B) A GUI uses visual elements like windows and buttons, a CLI uses text commands
☐ C) A CLI only works on Linux
☐ D) A GUI is for professionals, a CLI is for beginners
2. You are in the directory /home/user/project/data. What does the command cd .. do?
☐ A) It deletes the folder data
☐ B) It moves to /home/user/project
☐ C) It moves to /home/user
☐ D) It shows the folder contents
3. You want to create a folder "test", create a file "log.txt" inside it, and verify the file exists. Which sequence is correct?
☐ A) touch log.txt, mkdir test, ls
☐ B) mkdir test, cd test, touch log.txt, ls
☐ C) cd test, mkdir test, touch log.txt
☐ D) touch test/log.txt, ls test
4. Why is the command line better suited than a GUI for renaming 500 files?
☐ A) The command line displays files faster
☐ B) A single command can process all 500 files automatically
☐ C) A GUI cannot rename files
☐ D) The command line has a built-in undo function
Answer Key: 1) B · 2) B · 3) B · 4) B
Checkpoint: Test Your Knowledge
Name two situations where a graphical interface (GUI) is better suited, and two where the command line (CLI) is the better choice.
You are in the directory /home/user/project. What is the relative path to /home/user/data/file.csv?
Create a folder called "experiment" in the terminal, place an empty file "notes.txt" inside it, and verify it exists. Which three commands do you need?