The Terminal for Complete Beginners: 15 Commands You'll Actually Use
The black window with blinking text isn't as scary as it looks. What the terminal is, why AI coding tools use it, and the fifteen commands that cover almost everything a beginner needs — plus the few that deserve respect.
Sooner or later, a tutorial or an AI tool will say "open a terminal and run this." For many people, that's where building an app starts to feel like it's for someone else. It isn't. The terminal is just a different way of telling your computer what to do — by typing instead of clicking.
And if you use AI coding agents like Claude Code, it's worth understanding, because that's where they work: they run terminal commands to install things, start your app, and run tests. Knowing the basics means you can follow what they're doing.
What the terminal is
The terminal (also called the command line, shell, or console) is a text window where you type commands and see results. It's the same computer and the same files you see in Finder or File Explorer — just a different way of reaching them.
How to open it:
- Mac: open Terminal (search with Cmd+Space).
- Windows: open Windows Terminal or PowerShell from the Start menu. (Commands differ slightly on Windows; many developers install Git Bash or WSL to get the same commands as Mac and Linux.)
- Linux: open Terminal from your apps.
- VS Code and most editors have a built-in terminal too.
You'll see a prompt — some text ending in $ or > — waiting for you to type. Type a command and press Enter.
Where am I? Moving around
The terminal always has a "current folder," like having a folder open in Finder.
pwd # "print working directory" — where am I?
ls # list what's in this folder (Windows PowerShell also accepts ls)
cd my-project # go into the folder "my-project"
cd .. # go up one level
cd ~ # go to your home folder
Tip: press Tab to auto-complete folder and file names. Type cd my-p and press Tab — the terminal fills in the rest. It saves typing and typos.
Working with files and folders
mkdir notes # make a new folder
touch todo.txt # create an empty file (Mac/Linux)
cat todo.txt # show a file's contents
cp a.txt b.txt # copy a file
mv a.txt docs/ # move (or rename) a file
Running your project
These are the ones you'll use most when building an app. Most JavaScript projects use npm (more in What Are npm and package.json?):
npm install # download everything the project needs
npm run dev # start the app on your computer
When the app is running, the terminal is "busy." To stop it, press Ctrl+C. That's the universal "stop what you're doing" key.
Git
Saving your work (explained in Git and GitHub for Beginners):
git status # what's changed?
git add . && git commit -m "describe the change" # save a snapshot
Handy tricks
- Up arrow — brings back the previous command. Press it again for older ones.
- Ctrl+C — stop the running command.
- Ctrl+L or
clear— clear the screen. - Tab — auto-complete.
- Copy and paste — usually Cmd+C/V on Mac; on Windows and Linux terminals, often Ctrl+Shift+C/V (because Ctrl+C means "stop").
Commands that deserve respect
The terminal does exactly what you say, with no "are you sure?" and no recycle bin. A few commands can do real damage:
rmdeletes files — permanently.rm -rfdeletes whole folders and everything in them, without asking. Double-check the path before pressing Enter.sudoruns a command with administrator powers. If a tutorial tells you tosudosomething, make sure you understand why.- Anything you don't understand from a random website. Especially commands that download and run a script (
curl ... | bash). Only run those from sources you trust.
This is also why AI coding agents ask permission before running commands, and why it matters where they run. An agent with terminal access on your personal computer can reach all your files. (Running Claude Code Unattended covers how to set that up safely.)
Reading what comes back
When a command fails, the terminal shows an error message. It looks alarming, but it's the most useful thing on the screen: it usually says what went wrong and where. Don't clear it — read the last few lines, or copy the whole thing into your AI tool. How to Read an Error Message walks through it.
The 15 commands, on one card
pwd where am I? npm install get dependencies
ls what's here? npm run dev start the app
cd NAME go into a folder Ctrl+C stop
cd .. go up git status what changed?
mkdir X new folder git add . stage changes
cat FILE show a file git commit save a snapshot
cp / mv copy / move ↑ / Tab history / complete
rm delete — carefully!
You don't need to memorise this. After a week of using it, you'll know them without thinking.
EasySpawn gives every project a cloud workspace with a full terminal — reachable from your browser, phone, or SSH — where you can watch exactly which commands Claude Code runs, and interrupt at any point. See how it works or join the waitlist.
Related: What Is Claude Code? · Git and GitHub for Beginners · VS Code for Beginners · How to Install Claude Code
Keep reading
How to Write Good Commit Messages (and Why It Matters With AI)
'fix', 'update', and 'wip' tell you nothing six months later. What a commit message is for, the simple format most teams use, examples of good and bad messages, how often to commit when an AI tool is making the changes, and how to get Claude Code to write useful ones.
How to Write a README for Your Project
The README is the front page of your project — for collaborators, clients, future you, and AI tools that read it for context. What to include, a template you can copy, how it differs from a CLAUDE.md, and the mistakes that make READMEs useless.