The Terminal
An introductory conversation with the tool many consider outdated — and nobody has truly replaced.
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
Definition
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
Visual and intuitive. Easy to discover, undo available. Great for image editing, web design, and casual use. Higher resource usage, hard to automate.
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
Definition
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. 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
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.
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. 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 the folders data, docs, src and the files 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
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.
pwd
Where am I right now?
Prints the absolute path of your current working directory. Essential for orientation — especially before deleting or moving files.
pwd → /home/user/project
Always check pwd before rm so you don't delete in the wrong folder.
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
- 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.
Check
Quiz: The Terminal
What is the main difference between GUI and CLI?
Select one answer
1. What is the main difference between GUI and CLI?
2. You are in the directory /home/user/project/data. What does the command cd .. do?
3. You want to create a folder "test", create a file "log.txt" inside it, and verify the file exists. Which sequence is correct?
4. Why is the command line better suited than a GUI for renaming 500 files?
Check
Checkpoint: Test Your Knowledge
Can you explain this in your own words? Tick what you've got.
0 of 3 done