The terminal is intimidating because you can’t tell where you are. Fix that—know your location and how to move—and the fear goes. Here are the first five commands, the ones that make Git and npm tutorials followable.
Opening it from VS Code is fastest
From the VS Code menu: Terminal → New Terminal. It opens at the bottom of the editor, and it starts inside the folder you have open, which saves you moving around.
You can also open a standalone app:
- Mac — Applications → Utilities → Terminal
- Windows — search the Start menu for “PowerShell” or “Command Prompt”
Whichever you use, the commands here work nearly identically.
Reading the screen
Before you type anything, there’s a line already there. That’s the prompt—the “go ahead” signal.
% (a > on Windows) is what you type.The folder you’re currently in is written right there—knowing that alone removes most of the confusion.
The five to learn
| Command | What it does |
|---|---|
pwd | Print where you are |
ls | List what’s in the current place |
cd folder-name | Go into that folder |
cd .. | Go up one level |
clear | Clean up the screen |
pwd — where am I?
pwd/Users/shima/Documents/my-siteYou get an address separated by /. Left is higher up, and each step right goes deeper.
ls — what’s here?
lsimages index.html script.js style.cssRun ls before you move. Confirming the folder exists before you cd into it prevents most failures.
cd — moving around
cd my-site # go into my-site
cd .. # go up one level
cd images # and deeper again.. is the fixed way to write “one level up.” Stack it to go further: cd ../...
Two habits that remove the pain
Complete names with Tab
Type part of a folder name and press Tab, and the rest fills itself in.
cd my ← press Tab here
cd my-site/ ← completedNo more typos—and if nothing completes, that name doesn’t exist, which you learn on the spot. It’s the single most useful key in the terminal.
Drag and drop folders
To reach a deeply nested folder, type cd (with the trailing space) and then drag the folder onto the terminal window. The path is pasted in for you.
Know how to stop things
Some commands, like a development server, keep running. To stop one: Ctrl + C (Ctrl on Mac too, not ⌘).
When the screen “won’t come back,” that’s your first move.
Where Windows and Mac differ
| To do this | Mac / Linux | Windows (Command Prompt) |
|---|---|---|
| List contents | ls | dir |
| Show location | pwd | cd |
| Clear the screen | clear | cls |
| Move | cd | cd (same) |
PowerShell and Git Bash accept ls and pwd on Windows too. Most tutorials are written for Mac and Linux, so Git Bash makes them easier to copy verbatim.
A wrong command breaks nothing
Mistyping does no harm; you just get an error message.
- ↑ key — recalls your previous command, so retyping is quick
- Read the errors —
No such file or directorymeans “nothing here by that name”
Summary
- Open the terminal from inside VS Code. The folder you’re in is shown in the prompt
- Learn pwd, ls, cd, cd .., and clear. Make
lsbeforecda habit - Tab completion and drag and drop kill typos. Ctrl + C stops what’s running
Once these five feel natural, Git, npm, and WordPress setup guides all become things you can simply follow along.