3

So I have been using Ubuntu for a few months now, and have come across a very noob terminal question.

I want to go from home -> Documents -> My Programs

I am able to get into my documents folder by doing

cd ./Documents

But when I want to go into "My Programs", I am unable to do so because of the space between "My" and "Programs". Is there a different syntax I must use to access this folder via terminal?

2
  • Put a "\" after "My" when typing it in. So it would look like cd My\ Programs/
    – Terrance
    May 13, 2016 at 20:38
  • You need to escape the space in between characters with \, in your case My\ Programs. Alternatively, you can get bash to autocomplete the address by simply typing My then pressing the Tab key.
    – Rewarp
    May 13, 2016 at 20:39

1 Answer 1

5

You can quote the whole directory name or escape the space in between the words.

In a nutshell, do any one of the following:

cd 'My Programs'
cd "My Programs"
cd My\ Programs