๐Ÿ”’ Members-only lesson โ€” thanks for supporting devnotes
← back to course
progress is saved in this browser โ€” no account needed
devnotes / Developer Tools / Lesson 1
lesson 1 of 6 ยท premium

Terminal Basics: Navigating Without a Mouse

18 min ยท Developer Tools

Every developer eventually stops clicking through folders and starts typing instead. The terminal looks intimidating for about a day โ€” then it becomes the fastest way to do almost everything. This lesson gets you comfortable with the handful of commands you'll actually use daily.

What the terminal actually is

The terminal (also called the command line, shell, or console) is a text-based way to talk directly to your computer โ€” instead of clicking icons, you type commands. On Mac and Linux it's usually called Terminal; on Windows it's PowerShell or Command Prompt (most developers on Windows now use Git Bash or WSL for a more standard experience, since it matches Mac/Linux commands).

The prompt: reading what it's telling you

yourname@computer ~/Desktop $

Everything before the $ is just context (your username, computer name, and current folder). The $ is where you type. Every command in this lesson goes right after it.

Moving around: the commands you'll use constantly

CommandDoes
pwd"Print working directory" โ€” shows exactly where you are right now
lsLists everything in the current folder
cd foldername"Change directory" โ€” moves into a folder
cd ..Moves up one folder (to the parent)
cd ~Jumps straight back to your home folder from anywhere
$ pwd /Users/alex/Desktop $ ls project-1 project-2 notes.txt $ cd project-1 $ pwd /Users/alex/Desktop/project-1
quick tip
Press the Tab key while typing a folder or file name โ€” the terminal auto-completes it for you. This alone saves enormous amounts of typing and typos once it becomes habit.

Working with files and folders

CommandDoes
mkdir nameCreates a new folder
touch file.txtCreates a new empty file
rm file.txtDeletes a file โ€” no recycle bin, be careful
rm -r foldernameDeletes a folder and everything inside it
cp source.txt copy.txtCopies a file
mv old.txt new.txtRenames or moves a file
important
rm does not ask "are you sure?" and does not send files to a trash bin โ€” they're gone immediately. Double-check the file name before pressing Enter, especially with rm -r.
AD SLOT โ€” 728ร—90 or responsive (mid-lesson)

Opening the current folder in VS Code

$ code .

This single command opens your code editor directly in whatever folder you're currently in โ€” no navigating through "File โ†’ Open" menus. It's one of the most-used commands once it becomes habit.

Clearing the clutter

$ clear

Wipes the visible history in your terminal window so you're not scrolling past old commands. Nothing is actually deleted โ€” it's purely visual.

Try it yourself

exercise
Open your terminal. Use pwd to see where you are, ls to see what's there, and cd into any folder you can see. Then use mkdir to create a new folder called devnotes-practice, and cd into it.

Level up: build a small project structure

exercise 2
Inside your devnotes-practice folder, use touch to create index.html, style.css, and script.js. Run ls to confirm all three exist, then run code . to open the whole folder in VS Code.
โœ“ quick check โ€” 3 questions

1. What does cd .. do?

2. Which command permanently deletes a file with no recycle bin?

3. What does pressing Tab while typing a file name do?

what's next
Lesson 2 covers Git โ€” how to save versions of your code as you work, so you can always undo a mistake and never lose progress again.
bottom line
pwd, ls, and cd cover 90% of daily terminal navigation. Add mkdir, touch, and code ., and you can build an entire project structure without touching a mouse.
AD SLOT โ€” 300ร—250 or responsive (in-lesson)
next upLesson 2: Git Basics
Continue โ†’