bash: command not found
Ok, I have used putty for a little while now. I am trying to compile C code on the terminal. Actually I can get it to compile with gcc, but when I go to execute the file I see bash: hello_world.exe : command not found. What am I missing? When i type ls, it pulls up the file. I chose hello world only bc it is such a basic program.
#include <stdio.h>
int main ()
{
printf("\n Hello World");
return 0;
}
margot@margot:~$ pico hello_world.c
margot@margot:~$ gcc hello_world.c -o hello_world.exe
margot@margot:~$ hello_world.exe
bash: hello_world.exe: command not found
margot@margot:~$ ls
Desktop Examples hello_world.c Logs nautilus-
Documents Firefox_
margot@margot:~$
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- John Clarke
- Solved:
- Last query:
- Last reply: