The Linux filesystem hierarchy is full of unused folders that only exist for historical reasons.
Do any distros install with only the directories that are actually used?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
(Rewritten after comments showed this question and my answer were not moving anywhere productive. It's got a new tone and covers the ground a bit differently).
Each distribution does what they feel is best for their users. This usually consists of A) some level of customization to fit their particular philosophy and B) some level of standardization for comparability with other distros.
The most important standardizing factor is the FHS / Filesystem Hierarchy Standard which tries to keep a clear and consise definition for all the major directories found on UNIX systems today. The standard is evolving to accommodate the needs of modern distros but moves slowly so as not to break old ones. Most distros don't wander too far from FHS. Read it. It will help you make sense of all Unices.
While not every directory might be used in a default install, most of them are. The hierarchy is not "full of unused" directories, and even the few that start out empty are there because they will potentially be used. For example, since binaries from distro packages are all installed in
/usr/local/bin is for custom additions of your own, the later folder will start out empty on any clean installation. However, it still exists for a purpose.
The original question began with a comparison about the "organized" Windows directory layout and the "confusing" Unix layout. I do not think that is a fair comparison, here is why.
Any comparisons between systems needs to take into account the scope of the things being compared. You can compare and apple to an orange and produce* a useful list of differences. Some people will prefer one over the other. What you cannot easily do is compare an apple to an oil refinery.
That's intentionally a dramatic statement, but I hope it helps you to understand the scenario at hand. The Unix file system does more than the Windows file system does. It is therefore more complex. If you want to compare them, you should take into account all the systems in Windows play the same roles covered by just the file system in Unix. For example the things the Windows Registry does are mostly rolled into the Unix file system. In Unix, devices like your hard drives and mice are also file nodes and can be manipulated as such. Even meta data about running processes and kernel level options like networking parameters can be read and written to through the file system. On Windows these require special APIs and complex programs. In Unix it's as simple as reading or writing a text file. This explains things like the
/run directory structures which don't appear to have counterparts in Windows.
Additionally, in spite of the extra function, it probably isn't as "dirty" as you might first assume. There are historical reasons for some decisions, but they continue to exist because they continue to be used. I am not aware of folders that are routinely empty.
The user-facing GUIs in Linux operation almost entirely in realm of the
$HOME directory. Everything is in
/home/username or your distro's equivalent. Inside that space, there is a trend towards verbose names with capitals such as "Downloads" and "Pictures" rather than "incoming" and "pics". Anyone simply USING a Linux computer through a modern GUI is unlikely to need to know about anything other than these familiarly named folders in their home directory.
Anything outside the home directory is the realm of system administrators. Only when you want to modify or extend a Linux system do you need to learn about the rest of the directory structure. If you plan on writing software, or tinkering with existing bits, it is worthwhile to learn the current conventions as detailed in the FHS specifications which are generally adhered to by most distros.
Also of note when coming from a Windows background is that, in general, distributions rather than individual software packages make the decisions about where things go. They are generally very similar, but each distro will have an overall unifying philosophy of where things should be kept. In Windows software, the software authors place their stuff wherever they want and distribute it with an installer that places it there. Usually everything ends up in some tree of their own design under a couple folders with their program's name. In the Linux world, software is usually distributed in packages maintained by the makers of the distro. Upstream software is split up, wrapped and generally made to conform to the distro's preferences. This usually results in a much more organized overall system. You don't need to re-learn anything with each new package you install, the important thing is that you already know the ropes of your distro and everything will be consistently found in the same places.
When looking for the executables for package A, B and C, where A is from part of the Windows core but B and C are from different vendors. In Windows it might be:
c:\Windows\System32\programA.exe c:\Program Files\Vendor A - Program A\packageA\program\A.exe c:\Program Files\programB\bin\program.exe
...but it could be several other variants depending on the vendor's habits. Let's say in Linux you installed package B through the package repositories and C by downloading a source package and manually installing it. The binaries will predictably end up in:
/usr/A /usr/bin/B /usr/local/bin/C
If you still feel the system needs "fixing" it might be worth considering the comments on this question. It is possible to "re-organize" the current layout, but any attempt to do so will quickly run afoul of what many consider very finely tuned machinery.
* Pun intended.