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 trial

Development Tools Console Foundations Getting Started with the Console Moving Around the Filesystem

Which of these commands will NOT take you to your home directory, assuming your username is treehouse?

I do think the answer is 'cd /home/treehouse' because it looks like heading for the folder named treehouse instead of home. Please share some wisdom for my confusion... thx!

2 Answers

Stone Preston
Stone Preston
42,016 Points

on linux systems your home directory is /home/<username>. so if your username is treehouse your home directory is /home/treehouse

typing any of these commands will take you to your home directory assuming your username is treehouse:

$ cd /home/treehouse
$ cd $HOME
$ cd ~

the ~ is just a shortcut for the home directory and $HOME is a variable whose value is the home directory

The Answer is "cd /home" it takes you to home directory not at your home directory according to your user name.,