$HOME/bin

Ralf Corsepius rc040203 at freenet.de
Mon Jul 13 13:27:24 UTC 2009


Paul W. Frields wrote:
> On Mon, Jul 13, 2009 at 02:08:55PM +0200, Ondřej Vašík wrote:
>> Stefan Assmann wrote:
>>> Hi all,
>>>
>>> I was wondering why there's no $HOME/bin directory and $HOME/bin not
>>> mentioned in the $PATH variable. Any particular reason not to have that
>>> by default?
>> $HOME/bin is not on every system and the other default directories in
>> default PATH are(at least on the most of systems ;) ). However, some
>> Linux distros do add something as:
>> # set PATH so it includes user's private bin if it exists
>> if [ -d "$HOME/bin" ] ; then
>> PATH="$HOME/bin:$PATH"
>> fi
>> as default - so this dir gets added automatically when does exist.
>> I'm generally +1 for changing the default that way - as it would not
>> change anything for users without that directory.
> 
> I would only want this at the *end* of the current PATH, not the
> beginning, for obvious security reasons.

1. Your practice to a wide extend defeats one prime rationale for ~/bin: 
Replacing/Overriding vendor-provided applications by per-user installed 
versions.

2. Unless using ~/bin as root, these files are user-installed binaries, 
which under normal circumstances may only have security impacts on user 
files => What you call "obvious security reasons" are minor concerns.

The only real issue you are solving by appending ~/bin instead of 
prepending ~/bin to $PATH is avoiding application-name conflicts.




More information about the devel mailing list