[arch-general] /etc/profile PATH variable wrong
schizoid29 at gmail.com
Sun Aug 15 09:19:24 EDT 2010
On Sun, Aug 15, 2010 at 5:44 AM, Heiko Baums <lists at baums-on-web.de> wrote:
> Am Sun, 15 Aug 2010 11:21:24 +0200
> schrieb Laurent Carlier <lordheavym at gmail.com>:
>> Le dimanche 15 août 2010 11:20:33, Allan McRae a écrit :
>> > On 15/08/10 18:50, Jude DaShiell wrote:
>> > > In order for that to be correct it needs to also
>> > > have :/usr/local/bin inside of the quote marks.
>> > > The /usr/local/bin directory on Linux systems like slackware and
>> > > debian is where stuff gets put that anyone can execute that's on
>> > > the system. I put a simple shell script I wrote there then tried
>> > > to use it and it wouldn't work until I keyed in
>> > > the /usr/local/bin/myd command. That small script makes the date
>> > > and time more readable for me. Since that file was copied from
>> > > suse, people in that other distribution probably also ought to be
>> > > notified.
>> > What is wrong with not including that? If the system administrator
>> > can install files to /usr/local/bin then I am sure that they are
>> > competent enough to add that to their path.
>> > Allan
>> And as an user you can add the path in your .bashrc/....
> Of course they can, but Jude is not completely wrong with that,
> because /usr/local and /usr/local/bin are part of the official Linux
> Filesystem Hierarchy Standard (FHS). So it's an official path for local
> scripts and binaries, which are e.g. written by the administrator. And
> official paths, even if the package manager doesn't touch them, and
> standards should be officially supported by Arch, too.
> And why does it hurt adding this directory to the PATH?
> The original idea behind '/usr/local' was to have a separate ('local')
> '/usr' directory on every machine besides '/usr', which might be just
> mounted read-only from somewhere else. It copies the structure of
> '/usr'. These days, '/usr/local' is widely regarded as a good place in
> which to keep self-compiled or third-party programs. The /usr/local
> hierarchy is for use by the system administrator when installing
> software locally. It needs to be safe from being overwritten when the
> system software is updated. It may be used for programs and data that
> are shareable amongst a group of hosts, but not found in /usr. Locally
> installed software must be placed within /usr/local rather than /usr
> unless it is being installed to replace or upgrade software in /usr."
I agree with this /usr/local/ is a pretty common location to install
system wide software and imo /usr/local/bin /usr/local/sbin should be
included in the default path. FHS covers this and GNU conf also
defaults to this.
However in Judd's case I would think ~/bin would be better suited for
user scripts unless he needs to use them system wide ie. as another
user. since its much easier to edit save the files and does not
require root privileges to modify
More information about the arch-general