Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wanted to try to write a C++ program in "Monodevelop" and i use Ubuntu 12.10 as a OS. But when i finish writing my program (any program) and want to actually run my program, i get this error:

bash: /home/Username/C++: No such file or directory

Press any key to continue...

That "C++" in "/home/Username/C++" is supposed to be the name of the folder which i wanted to build my project in it and it's name is "c++ projects" now i understand it is because of the space that is between "c++" and "projects", so my question is, is there a way that i can build and run my program in a directory that has a space inside it's name? Now i tried writing the same program in "Code::blocks" and have had no problem. I understand i will have the same "no such file or directory" error if i try to go to a directory that has a space in it's name in the terminal, and it is pretty annoying that i can't have my program ran in the directory that i want it to run. Some help would be appreciated.

share|improve this question
up vote 2 down vote accepted

You need to quote your path


"/home/Username/C++ Projects/MyAwesomeProgram/bin/myawesomeprogram"

or escape the space

/home/Username/C++\ Projects/MyAwesomeProgram/bin/myawesomeprogram
share|improve this answer
thank you, it worked. – AmirRazoR Jan 31 '13 at 19:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.