linuxterminal

How can I go to a directory whose file name has spaces between them in the Linux terminal?


I am trying to go to a directory whose file name has spaces between them in the Linux terminal. I tried doing this:

cd Magical Island
bash: cd: Magical: No such file or directory

As you can see, it didn't work

How can I make it work?


Solution

  • You need to quote the directory name:

    cd 'Magical Island'
    

    or escape the space character:

    cd Magic\ Island