cd .. Command: How to Go Back Up a Folder
You just learned how to walk into a folder with cd. You went deep into College, which sits inside Desktop. Now you want to step back out, but there’s no button marked “exit.” So how do you climb back up a level?
This is where the cd .. command comes in, and it’s one of the most-used moves in the terminal.
The cd .. command moves you up one level, out of your current folder and into the folder that contains it (its parent). You type cd, a space, then two dots, and press Enter.
What does the cd .. command do?
Folders sit inside other folders. In our example, College lives inside Desktop. When you’re standing inside College, then Desktop is the level right above you, called the parent folder.
Think of the Back button on your phone. You tapped into a screen; one tap of Back takes you out, up to the screen you came from. Simple, fast, one tap. The cd .. command does exactly that for folders, taking you up one level in a single move.
What do the two dots mean?
The command has two parts, and reading them makes everything click:
cdis short for “change directory” — it’s the move part.- A single dot
.means “right here,” the folder you’re standing in. - Two dots
..mean “up one level,” the parent folder.
So cd .. reads as: leave this folder and go up one. That’s the whole idea.
How do I try the cd .. command right now?
The best way to learn this is to do it. Open your terminal and type the command exactly like this — remember the space between cd and the two dots:
cd ..
Press Enter and watch your prompt. If you started inside College, you’re now back in the Desktop folder. No clicking your way out, no getting lost — you stepped up in one move. If you’re not sure where you landed, the previous lesson on finding your current location shows you how to check.
Why is this command so handy?
Because you never get stuck deep inside a maze of folders. However many levels down you go, cd .. always pulls you back toward the surface, one step at a time. Run it twice and you go up two levels. It’s the partner to walking into folders, and together they let you move anywhere on your computer using just the keyboard.
These small, confident moves are the foundation everything else builds on. Once they feel natural, commands like Git and tools like Claude Code stop feeling scary. You can pick up each step, in plain Hindi and English, in the free Zero to AI Hero course by Meegrow Labs.
Key takeaways
- The
cd ..command moves you up one level, into the parent folder. - Type
cd, a space, then two dots:cd ..— then press Enter. - One dot
.means “here”; two dots..mean “up one level.” - It works like your phone’s Back button — fast, simple, one move.
- Run it more than once to climb up several levels at a time.
- Next up: going straight home with
cd ~.
🚀 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