On 16.05.2018 04:35, Sharan Basappa wrote:
> Hi All,
>
> where are the binaries for software typically installed in Linux? we have
> installed Anaconda python distribution. The path for installation is
> /tools/anaconda
Directory /tools is non-standard. (My Linux doesn't even have it.)
> When I check its path (which python), it shows /usr/bin path. Is it
> possible that there is already a python installed or a soft link is added
> to /usr/bin for python to /tools/anaconda?
/usr/bin (or /bin), for example, are standard directories for binaries.
It is possible to create links, but I don't think it's advisable to do so.
If you install new versions of software with your standard update process
your links will be overwritten.
Usually own versions are installed in the directory /usr/local/bin. (Here,
if desired, you could also create a link to your tools directory.)
>
> Also, in case there are multiple binaries, how can I make Linux pick up the
> binary from /tools/anaconda rather than /usr/bin. Do I need to do alias
> python to /tools/anaconda?
The PATH environment variable controls which path is searched first for a
call. While it is possible to litter the PATH with other directories (like
your /tools directory) it is in my experience better to have it terse. If
you put /usr/local/bin before /usr/bin the files in the former directory
will be picked first. For example
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:.
Janis