Default directory layouts need a reboot

The Linux filesystem hierarchy standard—the directory layout—is a disaster. Despite a few changes, it's basically the Unix layout created in the early 1980s. What a mess. The default file system organization in Windows is no good either.

This is an evolving attempt to define a modern directory structure.

If you don't agree that the defaults of both Linux and Windows are poor—if you can't admit directory names such as "usr", "Program Files", "mnt", "PerfLogs", "opt", "Windows", and "var" are bad—then you are probably blinded by commitment bias. You've learned to love these directories despite their poor names and now consider them gospel. And if we're treating directory names as religious matters, I should be clear: I'm no theologian.

The existence of guides that explain the complicated and embarrassing history of today's directory layouts should be evidence enough that the layouts are not good enough.

High-level objectives

Here are my objectives for a modern default directory structure. These objectives are for the directories that would exist by default when an operating system is installed and do not have any bearing on changes made by users after that.

  • Directory names should be obvious to users with modest computer experience. Measure: An average user should be able to guess the purpose of the directory in one try.
  • The need to review reference material should be minimized. Measure: Experts should never have any doubt about the purpose of each root directory.
  • Directory names should not be cryptic to any degree because this causes casual users to view them as mysterious and instills a perception that the file system is beyond their capability.
  • Directory names should be short, but not to excess. Removing vowels for brevity is disallowed because it creates cryptic names and reduces clarity. Measure: directory names should be one full word.
  • Directory names should not contain spaces, although supporting spaces in a file system is not necessarily a bad thing.
  • Directory names should be mixed-case (capitalized words) because file systems should not be case-sensitive. A file system that is case-sensitive is just trolling users.
  • The forward-slash directory separator should be used: /. Windows supports this today despite its convention being the backward-slash. Modern users are familiar with the forward slash separator from Internet URLs. In today's world, a file system that uses the back-slash is just trolling users.
  • Users should feel at comfort with the file system. Measure: a novice user should not feel hesitation in browsing their computer's file system.

Proposed defaults

  • /System - Operating system files. Non-power users will intuit that they will find little of interest in this directory.
    • /System/Temporary - Temporary files.
    • /System/Logs - Log files.
    • /System/Libraries - Shared libraries.
    • /System/Drivers - Device drivers.
  • /Apps - Installed programs and applications. Love it or hate it, the word "App" is no longer just a short form of "Application." I'd personally prefer the more verbose Applications, but I think most users would find Apps more comfortable. Each application directory should contain nothing but these sub-directories:
    • /Apps/[appname]/Executables - Contains the executable binaries for the application.
    • /Apps/[appname]/Configuration - System-wide configuration for this application.
    • /Apps/[appname]/Documentation - Contains any documentation for the application.
    • /Apps/[appname]/Resources - Contains any non-executable, non-documentation materials used by the application. Non-power users should easily identify this as a directory that has nothing of interest to them.
  • /Users - Contains sub-directories for each user of the system.
    • /Users/[username] - A specific user's directory.
    • /Users/[username]/Configuration - A root for user-specific application configuration directories. May be hidden by default.
    • /Users/[username]/Configuration/[appname] - Configuration for the application+user combination, which either augments or supersedes the system-wide configuration for the application.
    • /Users/[username]/System - A root for user-specific system data. May be hidden by default.
    • /Users/[username]/Documents - A root for application-created documents.
    • /Users/[username]/Shared - The only directory within a user's directory that is by default readable by other users.
  • /Groups - Contains sub-directories used by groups of people. This may be optional because not every computer is a multi-user computer.
    • /Groups/Everyone - A default group that all users of the system are part of.
  • /Devices - Contains roots for attached devices. For example:
    • /Devices/USB1 - A USB flash memory device. Perhaps "Usb1" or "usb1" would be a better name. I'm not particularly fond of all-capital initialisms.
    • /Devices/CD - A CD or DVD drive.
  • /Network - Shared file systems on the local network. For example:
    • /Network/MediaServer - Your media server.
    • /Network/MediaServer/Movies - A collection of movies hosted by your media server.

Notes

  • All system tools should be in the /Apps directory. The binary executables in /System should be the kernel. In other words, in routine use, even power users would never directly launch any of the binary executables stored in /System.
  • The above proposal is just one take without a great deal of thought.
  • Another take: GoboLinux (see more at Wikipedia).
  • The point is not that the proposed defaults above are good; they might be mediocre at best. Rather, the point is that today's existing defaults are due for retirement. I'd be happy with any reasonable new defaults.
About this blog