A new filesystem hierarchy definition

The typical filesystem hierarchy of Unix systems generally makes sense, but there is some weird legacy cruft and many conventions that don't make sense (at least to me). I'm planning on building a system by following the instructions at the Linux from Scratch project, and when I do so, I want to put in place a filesystem hierarchy that I like a little better. I'm documenting it here so I can keep track of my thinking on it.

The main unusual features are that there's no /usr, like in Hurd (I agree with the GNU folks that it's obsolete), and that it's very symlink-heavy. All the programs are kept in /pkgs with symlinks to the relevant spots in /bin, /man, etc. This is a bit of a performance hit, but who cares. It would have made a difference in the old days, but on modern machines we're talking milliseconds, if that.

Also, since this is my own distribution, there's no need for /usr/local (or /opt). It's all local.


  1. /bin

    Symlinks to executables in the individual /pkgs I'm drawing no distinction between /bin and /sbin; too arbitrary, methinks. I'm sick of having to add /sbin to my PATH all the time.

  2. /cd

    For mounting the CD-ROM. If there's more than one CD-ROM drive then this should have subdirectories of:

    1. /1
    2. /2

    etc.

  3. /dev
  4. /etc
  5. /home
  6. /include
  7. /lib
  8. /libexec
  9. /man
  10. /pkgs

    This contains all the compiled software for the system, and is where all the symlinks point to. Each software package is kept in its own directory. Suppose we have version 381 of "less" installed:

    1. /less

      A symlink to /less-381

    2. /less-381
      1. /bin
      2. /man
        1. /man1

    And then there would be a symlink to /pkgs/less/bin/less in /bin, and to /pkgs/less/man/man1/less.1 in /man/man1.

  11. /proc
  12. /ref

    Not 100% sure about this one. It's basically the equivalent of /usr/share; It should contain miscellaneous documentation, the system dictionaries, time zone stuff, random reference documents like the ascii chart, birthstones, the King James Bible and the complete works of Shakespeare (which should be part of any English Unix distribution, IMHO), the CIA World Factbook, etc. However, it won't contain other stuff typically found in /usr/share, such as program config files (should go in appropriate subdirectories of /etc), /man (now a top-level directory), etc.

  13. /root
  14. /src

    Contains source code for everything, divided by individual package. Also, there's a

    1. /.distfiles

    directory to contain the uncompressed tarballs.


The main problem I see with this setup is convincing various packages to look in /lib and /include for stuff rather than in /usr/lib and /usr/include. Nice distributions respect CFLAGS, but some programmers are more anti-social than others.

Most people I try to explain this to tell me I'm an idiot, but oh well.