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

Sarah Breidenbach
Sarah Breidenbach
4,490 Points

Is there a way to use cd in the console terminal to move into folders that have a space between the words in its name?

Do I need to rename all my folders so they don't have spaces in the name in order to move through them using cd in the terminal?

1 Answer

use quotes

cd ~/"file name.extension"/

Sarah Breidenbach
Sarah Breidenbach
4,490 Points

Thanks deebird. The quotation marks are definitely the key. Accessing a folder though, so no extension. I didn't know what the tilda and slashes were for but I found a good reference at Ubuntu in case anyone else needs to know:

To navigate into the root directory, use "cd /"

To navigate to your home directory, use "cd" or "cd ~"

To navigate up one directory level, use "cd .."

To navigate to the previous directory (or back), use "cd -"

To navigate through multiple levels of directory at once, specify the full directory path that you want to go to. For example, use, "cd /var/www" to go directly to the /www subdirectory of /var/. As another example, "cd ~/Desktop" will move you to the Desktop subdirectory inside your home directory.