Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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've been teaching myself to write programs in C, using Geany as my IDE.

All of my programs get compiled and linked correctly, and they seem to work fine when I test run them inside of the IDE, however I can't seem to run to program without the use of the IDE.

I've tried using the terminal command ./[filename]

However, I always get this response from the terminal:

bash: ./variabletest: No such file or directory

Any idea why this doesn't work? Simply clicking on the executable's icon doesn't work either.

share|improve this question
up vote 2 down vote accepted

./variabletest requires the file you are running to be in the current directory. Run ls and see if variabletest is displayed, if not, cd to the directory where it is stored the run the program from there. If you are not sure where your file is located, run

readlink -f (nameoffile here).

This command will show you the path to your file for example you can have


as the output. You the need to

cd /var/www

then run your programme from there.

share|improve this answer
I think I understand what you are saying, though I'm not certain how to implement it. I apologize but I'm pretty new to all this. – Clark Sep 15 '13 at 9:22
@Clark, i have edited with the intention of shedding more light – sosytee Sep 15 '13 at 9:27
I've got it now. Thank you! – Clark Sep 15 '13 at 9:32

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.