Terminals
The terminal (also called the command line, shell, or CLI) is how developers talk directly to their computer using text commands instead of clicking around.
Why Terminals Matter
Section titled “Why Terminals Matter”You might be thinking: “Why would I type commands when I can just click?” Fair question. Here’s why:
- Speed — Once you know the commands, typing is faster than clicking through menus
- Power — Some things can only be done via terminal
- AI coding tools use them — Claude Code, npm, git, and most dev tools run in the terminal
- Automation — You can script repetitive tasks
Opening a Terminal
Section titled “Opening a Terminal”On Mac:
- Press
Cmd + Space, type “Terminal”, and hit Enter - Or find it in Applications → Utilities → Terminal
On Windows:
- Press
Win + R, type “cmd” or “powershell”, and hit Enter - Or search for “Terminal”, “Command Prompt”, or “PowerShell” in the Start menu
- For modern development, use PowerShell or Windows Terminal
In VS Code / Cursor:
- Press
Ctrl + `(backtick) or go to View → Terminal - This opens a terminal right inside your editor — super convenient
Basic Commands to Know
Section titled “Basic Commands to Know”Here are the essential commands you’ll use constantly:
See where you are
Section titled “See where you are”pwd“Print Working Directory” — shows your current location in the file system.
List files
Section titled “List files”lsLists all files and folders in your current directory. On Windows Command Prompt, use dir instead.
Change directory
Section titled “Change directory”cd folder-nameMoves you into a folder. Use cd .. to go up one level.
Create a folder
Section titled “Create a folder”mkdir my-new-folder“Make Directory” — creates a new folder.
Create a file
Section titled “Create a file”touch filename.txtCreates an empty file. On Windows PowerShell, use New-Item filename.txt.
Clear the screen
Section titled “Clear the screen”clearClears all the text in your terminal. On Windows, use cls.
Running Development Commands
Section titled “Running Development Commands”When working with AI coding tools and web projects, you’ll frequently use:
npm installInstalls all the project dependencies (the packages your project needs).
npm run devStarts your development server so you can preview your project locally.
git statusShows which files have changed in your project.
git pushUploads your changes to GitHub (remote).
Tips for Terminal Success
Section titled “Tips for Terminal Success”-
Use Tab to autocomplete — Start typing a file or folder name, then press Tab. The terminal will finish it for you.
-
Use the up arrow — Press the up arrow key to cycle through previous commands. Super handy for re-running things.
-
Read the errors — When something fails, the terminal tells you why. Read the error message — it usually points to the problem.
-
Copy/paste works — On Mac, use
Cmd + C/Cmd + V. On Windows Terminal, just right-click to paste. -
Don’t panic — If you get stuck, type
exitto close the terminal and start fresh.
The Terminal is Your Friend
Section titled “The Terminal is Your Friend”It might feel intimidating at first, but the terminal is just a different way to interact with your computer. With AI coding assistants, you’ll often see them generating terminal commands — and now you’ll understand what they’re doing.