Tools & Infrastructure

Command Line and Terminal Explained

Learn what the command line is, why it matters, and the handful of commands that unlock a whole new way of working with your computer.

Scroll to start

What Is the Command Line?

Every computer has two ways to talk to it: with a graphical interface (clicking icons, dragging files) or with a command line interface (typing text commands). The command line is just a text box where you type what you want the computer to do — and it does it.

When you double-click a folder icon, your computer is really running a hidden command like open /Users/you/Folder. The command line just skips the icon and talks straight to the computer's brain. Same result, different path.

On Mac and Linux, this tool is called the Terminal. On Windows, it's called Command Prompt or PowerShell. They're all doing the same job — taking text commands and making things happen on your computer.

Why Bother Learning the Command Line?

Here's the honest truth: you can use a computer for years without touching the command line. Icons and buttons work fine. But the moment you want to do anything with AI tools, coding, or automation, the command line is where the action is.

AI coding assistants like Cursor and Claude Code live inside terminals. Website hosting services give you a command line to push your code live. Automation tools run on schedules through the command line. If you want to work with modern tools, you'll need to get comfortable with text commands eventually.

💡 Key Insight

The command line isn't about being a "real programmer." It's about unlocking tools that don't have buttons — and most of them are the most powerful tools available today.

The Five Commands You Actually Need

Most people get overwhelmed by the command line because they try to memorize everything at once. Don't. Start with just five commands — they cover 80% of what you'll actually do day to day.

Your First Five Commands
📂
ls
List files in your current folder
🚪
cd
Move into a folder (change directory)
📍
pwd
Show where you are right now
mkdir
Create a new folder
plus: touch to create a file

Here's how they work together. You open your terminal and see a blinking cursor. That's your prompt — it usually shows your computer name and current folder. Type ls and press Enter to see what files are there. Type cd MyFolder to move into a folder. Type pwd to check exactly where you are. Type mkdir NewProject to make a new folder to work in.

That's it. Those five commands plus one bonus (touch to create an empty file) are enough to navigate and set up almost any project folder on your computer.

Setting Up a Project Folder

Let's say you want to set up a folder for a new website project. Here's what that looks like on the command line — each line is a command you type, followed by what the computer shows back:

terminal
~ $ pwd
/Users/andrew

~ $ mkdir my-website
~ $ cd my-website

~/my-website $ touch index.html
~/my-website $ ls
index.html

Notice how the prompt changed after we ran cd? It now shows ~/my-website — that's the command line telling you exactly which folder you're in at any moment. You always know where you are.

This is the same workflow you use every time you start a new AI-assisted coding project: open terminal, navigate to your folder, and start building.

Knowledge Check

Test what you learned with this quick quiz.

Quick Quiz — 3 Questions

Question 1
What does the ls command do?
Question 2
What does the cd command do?
Question 3
Why is the command line important for AI coding tools?