Rational Unix Filesystem Layout author Neil Franklin, last modification 2004.10.07 Been thinking a lot about the cruftyness of Unix file system layout At SUCON'04 listened to speach about "we need better than just patching up" So decided to put thoughts down in writing, collect them Bases /, /usr, /usr/local, /usr/opt, /root, /home// no /var -> /usr/var (no 2 mount point if same partition as /usr) some /usr/* symlinks to /usr/var/*, access always via them, never direct same for /usr/share, also only access via symlinks into it same some /usr/local/* may go to /usr/var/local/* same some /usr/opt//* may go to /usr/var/opt//* PATH (or BASEPATH) shows list of these BINPATH (PATH) MANPATH etc are seldom needed overrides allow $PATH/bin;blah/bin syntax all paths are evaluated by kernel, as part of name2i processing Actual Directories in each base cmd (bin), so (lib/lib*.so), exec (libexec), res (lib/) man/, doc, conf (etc) no /sbin, as in /root/bin no /usr/sbin, as in /root/bin or /home//bin in / also dev, exec/boot (boot) in bases other than / also lib (only lib/lib*.a), include, src (code and man) in /root and /home/ their own tmp, no /tmp, no 777 or 1777 dirs at all Man Pages man pages for /bin also in /man, not /usr/man as no /bin/groff they must be prerendered like in BSD groff->ascii is regarded as compiling man page, like c->bin for code man/ is class=bin|exec|conf|lib|... like dir names Configuration and Preferences conf files also in /usr[|/local|/opt/], for programs in same bases /conf only the few configs for /bin stuff users /home//.conf stuff in /home//conf Users /etc/passwd -> /conf/users, also possibly a directory not file, entry per user only username:UID:GIDs:home, shell from /home//conf/shell /etc/shadow -> /home//conf/password /etc/group merged into /conf/users, same numeric range, no duplicate defs ev /root -> /admin, and same for user name Daemons for daemons /home/ with bin man conf tmp run spool log