Should the Linux Filesystem Hierarchy Change?
July 3rd, 2007
I’ve read a lot of complaints about the Linux filesystem hierarchy. If you haven’t read them, you can check out this search of the Ubuntu Forums for the phrase filesystem confusing. The main arguments against the current FSH are:
- The programs scatter their files in too many directories
- The are too many directories in general
- The names of the directories do not immediately make sense to the end-user
- Mac or Windows has a better hierarchy.
- GoboLinux maintains compatibility through symlinks—can’t other Linux distros?
and the typical responses to these arguments are:
- The average user doesn’t need to see the hierarchy
- Windows and Mac scatter their files into other directories, too.
- The folder names actually make sense if you look into why they’re called what they’re called.
- Symlinks can get messy.
- Once you get used to the Linux FSH, you’ll appreciate how much it does make sense
I’m a little in the middle. I’ve been a Linux user for a little over two years, and the FSH still doesn’t make complete sense to me, but I don’t think it should be revamped. I also do not think Windows’ hierarchy is any better. The Mac FSH is a little better, but it’s also essentially the same.
I had a naive moment as a Windows user, probably a decade or so ago. I think I was about to do a reinstall of Windows, and I thought if I copied my C:\Program Files\Name of Program to a floppy disc or CD-ROM, reinstalled Windows, and then just copied the folder back to C:\Program Files, that it’d all work out. After all, that’s what the folder was called: Program Files. I figured, “Hey, that’s where the programs must live.” Do I have to tell you the program didn’t run? I didn’t know why it didn’t run (I do now—it was probably missing a whole bunch of .dll files and registry keys), but I was confused as to why it didn’t run. Here’s another problem with the WIndows hierarchy: even though the name C:\Documents and Settings\username makes sense, very few Windows users know about that folder. They know My Documents. They don’t realize My Documents is really just a shortcut to C:\Documents and Settings\username\My Documents. And when you’re in Explorer viewing My Documents and press the up arrow (to go into the folder “above” My Documents), it takes you to your Desktop, which is really next to My Documents, not above it. I didn’t really realize how confusing Windows’ file and folder organization was until the first time I tried to clean out spyware/adware from my system (probably in about 2004). The tutorials had me editing registry keys buried five or six levels deep into regedit, and looking in C:\Windows\system32. Why couldn’t I just delete it from C:\Program Files? Well, it would just keep reappearing there again!
On the other hand, I don’t think Linux’s (or any *nix’s) filesystem makes sense to most users. Again, I’ve been using Linux for over two years now. It still doesn’t make sense to me. I’ve begun to memorize where some things are, but it still doesn’t make sense to me why they are where they are. I know the Grub config is in /boot/grub/menu.lst. I know my repositories list is in /etc/apt/sources.list. I know my personal files and settings are in /home/username. And I know a lot of random stuff (icons, executables, etc.) live in /usr. That’s about all I know. I’ve memorized a lot, but I wouldn’t be able to explain it to anyone else.
I guess the real question is—does it have to make sense? Well, I’d say it would be nice if it made sense, but, no, it doesn’t have to make sense. I could go on and on all day about my Mac OS X pet peeves (one of which is the lack of a Control-H or other easy way to hide and unhide files), but I think the filesystem is actually one thing Mac OS X does well. It’s basically like Linux, but it called /home /Users instead, called /media /Volumes instead and has an extra folder called /Applications where applications can be dragged and dropped. Even though I prefer integrated package management (apt-get / Synaptic), I do admire that the separate /Applications folder approach works well for Mac.
At the end of the day, though, using Ubuntu, using my wife’s Mac, using my Windows computer at work; I still use mainly /home/username, /Users/username, or C:\Documents and Settings\username\My Documents unless there’s a real problem.
I guess I’m saying it would have been great if I could make sense of the names and organization, but I’m working just fine with it the way it is. I don’t see the reason for making developers of distros as well as developers of applications bend over backwards to have the filesystem hierarchy “make sense” to the end user. I’d rather they work on successfully hiding (but also making accessible if the need arises) the nitty gritty details from the end user and put the damn .desktop files in for every application that can be installed through Synaptic Package Manager.
July 4th, 2007 at 1:59 am
I think the FHS is very well-designed. I won’t go into details about the layout (wikipedia does a good job of that: http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard), but basically, it put all files of a certain type together: system config files are ALL in /etc, user data is ALL in /home, and so on. It makes a lot of sense once you get used to it, much more than Window’s in my opinion. As for OS X, it actually uses the FHS, it just layers its own structure over that and makes the FHS transparent to the user (A very good idea, and the way I’d recommend doing it if we were to change how the filesystem was presented).
I agree about the .desktop files though, they’re not hard to make so it should be mandatory for main at least, and highly recommended for universe. Package managers like apt or yum do such a good job of making the FHS transparent that the average user really shouldn’t need to know about anything outside their home folder.
July 4th, 2007 at 4:58 am
The *nix file system hierarchy is confusing all right, but over a period of time, I’ve got a “feel” for what goes where and understood the different folder contents fairly well.
It shouldn’t change for the simple reason that any change will confuse existing users (as well as confusing new users).
July 4th, 2007 at 5:54 am
hari, you said “over a period of time.” Mind if I ask how long it took until you were comfortable with understanding things “fairly well”? I’ve been using Linux only two years.
July 4th, 2007 at 7:48 am
I’ve been using Linux for around 5-6 years or even longer if you count my initial failed attempts at Linux on and off. I’ve been comfortable with Linux every since I found the distro of my choice: Debian.
I cannot fix a time period but I think as I kept solving problems and learning more, I got used to the file system contents although I don’t profess to be an expert by any stretch of the imagination. Sheer necessity sometimes forced me to explore file system contents carefully.
And also actually I didn’t really notice the transition from newbie to intermediate all that much. I think I just learned whenever I needed to rather than force myself to learn.
These days I just want to get the job done. Not too keen on tweaking or playing around with Linux too much.
July 4th, 2007 at 10:44 am
I’ve installed Ubuntu yesterday. Yes, the FHS is somehow confusing, but Windows is the same. The difference is that people are more used to Windows (always the same!). For example: C:\i386… What’s that folder? C:\Windows\system32 and C:\Windows\system (as if there still were 16-bit components)… Why are there temporary folders everywhere? But we’re used to it.
FHS’s most confusing folder to me is /usr/local I really can’t understand fully what function does it have…
July 10th, 2007 at 8:17 pm
I am OK with Linux FSH for that matter UNIX FSH too :) Let windows users accustomed to new home aka Linux,rather than changing FSH for their sake.
June 28th, 2010 at 4:11 pm
old item, but, yeah, reading through… /usr, is for stuff that’s the same on every system, /usr/local is for stuff that’s been compiled for that system specifically. just figured someone would stumble in again and be interested.