Why must some executables be prefaced by ./ but others do not
Some linux binaries force me to put ./ or the full path in order to launch them, else I get a "command not found". Others (startx, for example) launch just fine without a path. What makes this distinction?
|
Executable files located in your PATH can be launched without a path. PATH is the environment variable telling your shell where to look for executables. Try "echo $PATH" to see where they can be found.
|
Thank you. I assumed that my home directory would be in the path but I see not. But I notice /home/[my home directory]/bin)/ *IS* in the path. That makes sense, and is obviously where I should be throwing my scripts.
Thanks again. |
$HOME/bin is not usually in the PATH, though I added it to mine. It's good for user's own programs. On some systems, I like $HOME/.bin, so the visible directories in $HOME can be data-only.
|
All times are GMT -5. The time now is 07:01 PM. |