gcc compile on cmd line, then run, get: bash: hello: command not found
I'm simply trying to compile and run a c program from command line in Linux Red Hat 7.2. Here are my steps:
1. I compile a simple hello world program using this:
gcc -g -Wall -ansi -pedantic -ohello -hello.c
2. It runs through just fine, no errors or warnings, so then at the command line, I enter simply:
3. And it tells me:
bash: hello: command not found
All I want it to do is spit out, "Hello World" and it won't... so maybe I'm in the wrong shell, or I have to put a command in that says execute hello or maybe the compile command used isn't actually creating an executable. As you can see, I'm very new to this. Got any suggestions?