Getting Started
15 minutes
linux
macos
windows

What is a Terminal?

Learn what a terminal is, why developers use it, and how to open one on your computer.

What you'll accomplish

Understand what a terminal is and be able to open and use one on your computer.

Prerequisites

  • A computer (Windows, Mac, or Linux)
  • No prior experience required

What is a Terminal?

A terminal (also called a command line, console, or shell) is a text-based way to interact with your computer. Instead of clicking on icons and menus, you type commands.

Imagine you could text your computer and ask it to do things. You type a message (a command), press Enter, and your computer responds. That's basically what a terminal is - a conversation with your computer using text instead of clicking.

When you double-click on a folder to open it, you're telling the computer "show me what's inside this folder." In a terminal, you'd type ls (or dir on Windows) - it does the same thing, just with text.

Why Do Developers Use Terminals?

You might wonder: if clicking is easier, why bother with typing commands?

Using a GUI (clicking)Using a Terminal (typing)
Good for everyday tasksFaster for repetitive tasks
Easy to discover featuresEasier to automate
Limited to what buttons existCan do almost anything
Hard to repeat exactlyEasy to repeat exact commands

Real example: To rename 100 files, you'd have to click on each one individually. With a terminal, one command handles all 100.

AI coding tools like Claude Code run in the terminal because:

  1. Precision: Text commands are unambiguous - no confusion about which button to click
  2. Automation: The AI can run commands automatically
  3. Power: Terminals can do things that have no GUI equivalent
  4. Scripting: Commands can be saved and reused

Most professional developers spend significant time in the terminal because it's simply faster once you learn the basics.

Opening a Terminal

Let's open a terminal on your computer right now.

Your First Commands

Now that your terminal is open, let's try some commands. Type each one and press Enter.

Command 1: Where Am I?

Command 2: What's Here?

Command 3: Clear the Screen

Key Concepts

The Prompt

The prompt is the text that appears before your cursor, waiting for input:

When you see this, the terminal is ready for you to type a command.

Case Sensitivity

Getting Help

Forgot what a command does? Try these:

Common Mistakes (and How to Fix Them)

ProblemSolution
"command not found"Check spelling, make sure it's lowercase
Terminal seems frozenPress Ctrl + C to cancel the current command
Want to exitType exit and press Enter
Typed something wrongPress Ctrl + C to cancel, then try again
Want previous commandPress the Up Arrow key

Frequently Asked Questions

Yes, it's possible. While some destructive system-wide commands require elevated permissions (sudo on Mac/Linux or "Run as Administrator" on Windows), commands can still delete or modify files you own without any special permissions. For example, rm -rf ~/Documents could delete your Documents folder without asking for a password. The commands in these lessons are safe, but always be careful with commands that delete, move, or overwrite files—especially those using wildcards (*) or recursive flags (-r, -rf).

Mac and Linux are based on Unix, so they share the same commands. Windows developed separately with different commands. PowerShell (modern Windows) provides Unix-like aliases for common commands, so ls and pwd work in PowerShell. However, these commands don't work in the older CMD.exe (Command Prompt). If you're using Git Bash or WSL (Windows Subsystem for Linux), those environments behave like Unix shells and support native Unix commands.

No! You'll naturally remember the ones you use often. For others, it's fine to look them up. Even experienced developers regularly search for commands they don't remember.

Verify Your Understanding

You've completed this lesson if you can:

0/6

Next: Learn about Git - the tool that lets you save checkpoints of your work and undo mistakes.