Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialStheven Cabral
Full Stack JavaScript Techdegree Graduate 29,854 PointsWhat is a directory and how do you navigate in and out of one?
What is a directory and how do you navigate in and out of one in the command prompt?
2 Answers
Jamie Reardon
Treehouse Project ReviewerTo expand on Steven parker's answer:
- ".." represents the parent directory.
- "." represents the current directory.
To move out of the current directory and into the parent directory you would use: cd ..
To move into a subdirectory that's within the current directory you would use: cd NAMEOFFOLDER
Replace "NAMEOFFOLDER" with the folder name you want to change into.
Steven Parker
231,198 PointsIf you know what a "folder" is on other operating systems .. well, "directory" is just another name for the same thing. It's a way to group files together on the storage device.
From the command line, you can change your current directory with the "cd" command. Just put the name of the directory you want to move to after the command.
Steven Parker
231,198 PointsSteven Parker
231,198 PointsTo move to a subdirectory of the current one, you do not type a slash ("/") before the name. The slash creates an absolute path based on the file system's root.
Jamie Reardon
Treehouse Project ReviewerJamie Reardon
Treehouse Project ReviewerYes sorry you are right. I was rushing to type the whole answer whilst being at work.