"Cd" into Directory Containg Space in Name [Duplicate]

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

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
Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest