Navigating Folders: cd, ls, pwd, mkdir
pwd — "where am I?"
pwd ("print working directory") shows the full path of the folder you're currently "in" inside the terminal. Just like Finder or File Explorer always shows you which folder is open, pwd tells you the terminal's current folder.
ls — "what's in this folder?"
ls ("list") shows every file and folder inside your current location — the terminal equivalent of opening a folder in Finder/Explorer and looking at its contents. (On Windows PowerShell, dir does the same thing, and ls also works as an alias.)
cd — "move into a different folder"
cd foldername ("change directory") moves you into that folder. cd .. moves you back up one level (to the folder containing your current one). Combined with ls and pwd, this lets you navigate anywhere on your computer without ever touching a mouse.
mkdir — "create a new folder"
mkdir foldername ("make directory") creates a brand-new, empty folder with that name inside your current location — the terminal equivalent of right-clicking and choosing "New Folder".
Key Takeaways
- `pwd` shows which folder you're currently in.
- `ls` (or `dir` on Windows) lists the files and folders in your current location.
- `cd foldername` moves into a folder; `cd ..` moves back up one level.
- `mkdir foldername` creates a new, empty folder — like right-click → New Folder.
Navigate and create a folder
Run `pwd`, then `ls`, then `mkdir my-first-folder`, then `ls` again to confirm it appeared, then `cd my-first-folder` and `pwd` again to confirm you moved into it.