Since this isn't a command-line-only system and a graphical desktop environment is installed, you should know about another way to use files and directories from the terminal whose names require quoting or are otherwise cumbrersome to type: Drag the folder icon from your file browser into the terminal window. On you system the file browser is Nautilus, but this works with nearly all file browsers. This pastes the full path of the file or directory whose icon you dragged with correct quoting automatically applied.
This isn't a full substitute for knowing how to quote pathnames (or, really, any text) yourself using the techniques pa4080 describes, but it's extremely useful, can save you a lot of time, and if you're not comfortable with when and how to quote using \
, in most graphical terminal emulators that's the form of quoting that is automatically applied when you do this, so it will demonstrate it to you. (In some, '
'
are used.)
Unless you've changed it, the shell you get when you open a terminal window or log on in a virtual console is Bash. The purpose of quoting in any shell is to tell the shell not to treat certain characters specially. You may want to read 3.1.2 Quoting in the Bash reference manual.
When you quote manually, I suggest you prefer the '
'
(single quotes) form, since it's the simplest and easiest way to quote more than a few characters of text. If what you want to quote doesn't itself contain a '
character then you can always enclose it in single quotes, because the only character with special meaning after '
begins quoting is the subsequent '
that ends quoting.
Finally, you may be wondering what happened when you had an unquoted &
in your command.
This treated what came before it (cd ISO
) as one command, ran it asynchronously in the background, and treated what came after it (Emulator
) as a second command to run as well (in the foreground, since it had no &
after it).
[1] 1635
reported the background job had started (it was job 1, and its process ID happened to be 1635).
bash: Emulator: command not found
reported there was no command called Emulator
.
- The message
bash: cd: ISO: No such file or directory
arrived from the background job to report there was no ISO
directory to change to.
[1]+ Exit 1
reported job 1 had finished.
cd 'ISO&Emulator'