Hello, I have a pretty basic question here.
I just wrote my first C program in FreeBSD, hello.c. After a quick
After some poking around I found that typing
Also, if it's not too much to ask, what then is the difference between executable files and shell commands? For example, I can use shell commands like
Thanks for your time!
-Squidward
I just wrote my first C program in FreeBSD, hello.c. After a quick
cc -o hello hello.c I'm ready to run my executable, hello. So I type hello into the shell prompt but am told that the command doesn't exist.After some poking around I found that typing
./hello produces the desired result. In this thread I am looking for an explanation on this. Do you always need to specify the directory of an executable file to run it, even if it is located in the current working directory?Also, if it's not too much to ask, what then is the difference between executable files and shell commands? For example, I can use shell commands like
ls and cd without specifying their location in the file system.Thanks for your time!
-Squidward