Quote:
Originally Posted by rajesh1978
In fact I know to set the path environmental variable . But I was diverted by the comments that I get as answer.
It in deed wanted to know as Linux is an open source if I want to add one command like ls,cd etc then where to put the executable or lib.
how the executable ls or cd is working the same way I want to put my own command.
|
'ls' is works the way it works just because its directory can be found in $PATH.
The library part is different; it's a non-issue if you statically link; for DLLs read 'man ldconfig' and perform WEB search on LD_LIBRARY_PATH, LD_RUN_PATH environment variables. Also, you might think about a shell wrapper for your executable, this is, for example, how 'firefox' is typically called/implemented.