What Is the cd Command? Moving Into Folders in the Terminal
You can already list folders with ls. You see them sitting right there. But seeing a folder is not the same as being inside it. So how do you actually step in? You don’t double-click here. You give one short instruction, and the terminal walks you in.
The cd command moves you into a folder in the terminal. Type cd followed by the folder name (like cd college) and press Enter, and you are now inside that folder, ready to work there.
What does the cd command actually do?
Think of your folders like rooms in a house. Right now you are standing in the hallway. A folder is a door beside you. To enter the room, you just open the door and step in.
The terminal does this in one line. cd is short for change directory, and “directory” is just another word for folder. So cd changes which folder you are currently standing in.
If you are still fuzzy on what a folder even is, it helps to start at the basics in the free Zero to AI Hero course before moving on.
How do I move into a folder?
The pattern is simple: two letters, then where you want to go.
cd college
Here cd is the “change” part, and college is the name of the folder you want to enter. So cd college means: walk into the College folder. That’s it. No menus, no clicking.
Picture the hallway again. There is a door marked College. You turn the handle, and you step right into the room. Now you are inside, not outside. That is exactly what the cd command does for you.
Why is the cd command useful?
Because now you can move around freely. You can step inside any folder you can see, and from there into the next one. No more endless clicking through windows.
This is how real developers navigate their projects. You don’t open files by hunting through a file manager. You jump straight to where you need to be, one short command at a time. Once this feels natural, the whole terminal starts to feel friendly instead of scary.
How do I try the cd command right now?
Open a terminal and type a folder name you can already see (for example, a folder called college):
cd college
Press Enter and watch the prompt. The prompt now shows the new folder you are standing in. That small change is the terminal telling you, “You’re inside now.”
If you typed the name wrong or the folder doesn’t exist, the terminal will simply say it can’t find it. No harm done. Check the spelling with ls and try again.
Key takeaways
- The
cdcommand moves you into a folder in the terminal. cdstands for change directory, and a directory is just a folder.- The pattern is
cdfollowed by the folder name, likecd college. - Folders are like rooms;
cdis how you open the door and step inside. - Watch the prompt change to confirm you are now in the new folder.
Next up: once you can step into folders, you’ll want to step back out. That’s where cd .. comes in, and you can follow it lesson by lesson in the free Zero to AI Hero course.
🚀 Take the full free course: Zero to AI Hero — learn to build with AI from scratch. New lessons daily, in Hindi & English.
Want to actually learn this?
151 free 2-minute lessons — from "what's a file?" to building with AI.
▶ Start the free course