Hi greengeek. I'm not sure how much of the following you know, so I'll just rattle on about it and you can take what you want from it.
The $PATH variable shows all the places your computer looks for executable programs that you can run without having to type their location, for example the "echo" command is probably in
/bin but you don't need to tell the machine where it is in order for Linux to find it. You can show the $PATH variable by typing
into a terminal, and you can see that
/bin is listed there, along with
/usr/bin and
/usr/sbin and a number of other places.
The $PATH variable is usually defined in your
/etc/profile file, though it can be added to and modified at any time, which can be dangerous. A while back I installed a program which wrecked my $PATH and caused my system to suddenly not recognise many of the programs on my machine. It took me quite a while to track down. Instead of using the standard method of extending the PATH
Code: Select all
PATH=$PATH:/the/new/dir/of/programs
they simply gave the new dir without including the old $PATH but luckily it defined the new $PATH in an additional file called
/etc/profile.local. I just commented the damaging lines out and my machine was good after the next reboot.
Why do some programs go in some directories and not others? It seems to be a mix of history and whim of the programmer who writes the installer script. I think
/sbin and
/usr/sbin and
/usr/local/sbin are supposedly reserved for "system" programs, but you can find any kind of program in there. (After all, how exactly does one define a "system" program?) All the
bin directories (and there are lots of them) hold all kinds of executables and script programs. It is a bit of a mess. I think the base level executables (
/bin and
/sbin) hold files that the system needs during boot-up. The deeper level ones, such as those in
/usr and
/usr/local are supposedly related to files made available for multiple users. The main focus of Puppy is as a single-user OS so this is less important for us.
For the standard rationalisations, see
http://en.wikipedia.org/wiki/Filesystem ... y_Standard
For the real reasons, see
http://www.osnews.com/story/25556/Under ... bin_Split/
I've long felt the Linux filing system needed an overhaul. It is not likely to happen though. It surprises me how conservative Linux enthusiasts can be and how much anger can be provoked by such suggestions. My personal feeling is that Linux is simply a tool -- a brilliant tool. It seems to me that the better a tool is, the more important it should be that we not let it get rusty. I think this is the great value of Puppy Linux. Barry Kauler, and the community of people who've come together with Puppy, have produced an efficient, fast, tool that works far more effectively than most Linuxes, but there will always remain more to be done.