3

I was looking to download some tool and it said to update your PATH variable, but I thought /usr/bin was the "standard".

  • Does the tool work with the symlinks? – Hauke Laging Jun 30 '13 at 17:34
  • 1
    If it's a local install, the standard location would be /usr/local/bin. Let the OS vendor handle /usr/bin. – tripleee Jun 30 '13 at 17:37
2

It is not too uncommon to have tools that expect to be installed at user level. As such, they will not assume that you can modify anything directly under /usr. It is often common, however, to have a ~/bin or ~/usr/bin directory where you can include symlinks to tools that you have installed for your user. Such that you don't have to constantly update a $PATH variable.

  • in my noobness I think I mistook ~/usr/bin for /usr/bin. THAT makes sense! – kevcoder Jul 1 '13 at 0:31
  • To be fair, I don't think there is a "set in stone" answer for this. I, personally, leave /usr/bin and friends alone. The package managers and everyone involved with that fun can take over those directories. The more adventuresome/knowledgeable folks out there are free to do whatever you want. If you find something that works really well, share it! :) – Josh Berry Jul 1 '13 at 2:56
0

I sometimes feel that it is more efficient to add a symlink from /usr/bin (or /bin or /usr/sbin or one of the friends) to wherever the application installed put the programs, rather than to add the program to a PATH definition.

Advantages:

  1. Don't need to update PATH settings in potentially a plethora of places.
  2. Fewer directories to search.

Disadvantages:

  1. This makes for a non-standard installation, which means you need to consider the impact on things like updates and re-installation, particularly when those may be carried out on people other than yourself.

The program will work the same whether its directory is added to the PATH, the files are copied into a directory already part of the PATH, or symlinked from an included directory to the directory where it is installed.

0

In Ubuntu ~/.profile includes:

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.