3

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

2
  • Does the tool work with the symlinks? Commented Jun 30, 2013 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
    Commented Jun 30, 2013 at 17:37

3 Answers 3

3

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.

2
  • in my noobness I think I mistook ~/usr/bin for /usr/bin. THAT makes sense!
    – kevcoder
    Commented Jul 1, 2013 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
    Commented Jul 1, 2013 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .