huer
asked on
c programming in linux
Hello,
I am a newcomer to linux and just installed RedHat 7.0 in my PC. I wrote a very simple C program such as printing Hello World on the screen and complied the source code by typing
gcc -o hello hello.c
The compling is Ok and a file called hello was generated.
But when i type hello to excute, it gave me such message:
bash: command hello not found.
I am really not familia with linux. Is anything wrong with the system? Or do i have to change any system file(such as .cshrc in Unix)?
Thank you.
I am a newcomer to linux and just installed RedHat 7.0 in my PC. I wrote a very simple C program such as printing Hello World on the screen and complied the source code by typing
gcc -o hello hello.c
The compling is Ok and a file called hello was generated.
But when i type hello to excute, it gave me such message:
bash: command hello not found.
I am really not familia with linux. Is anything wrong with the system? Or do i have to change any system file(such as .cshrc in Unix)?
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much interiot.
I wish i can get more helps from you later on.
I wish i can get more helps from you later on.
Shells won't automatically search the local directory unless "." is part of your path, in which case you have to prepend things with "./".