Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The UNIX concept of a home folder was great when users shared a single computer and had no idea where or how their files were stored in the system, but does it really make sense when a typical computer is used exclusively by a single person?

Having switched to a mac earlier this year I find this the hardest paradigm to wrap my head around as I use UNIX as my main desktop system. (I have used Linux and BSD as a server and "playground" for several years so I realise the benefits for server use).

  • As a superuser I use several external drives, memory sticks, backup devices etc. In fact, most of my data is there, not in the home directory.

  • I regularly reinstall my system, so I don't want my OS and data to reside on the same partition.

  • The home directory, even if I put it on a separate partition, is not big enough to store all the data I want to have at my fingertips.

  • The home directory is also used by the system and misc apps that have already occupied a bunch of folders.

The list goes on. All in all I get the feeling that I am working against the system instead of with it. Am I just damaged from years of DOS/Windows and just not "getting it", or is the structure simply not ideal for this kind of use?

How do you make the old concept of a home folder work with you instead of against you, considering how computers are used today? Tips, tricks, hidden benefits I have overseen?

Edit: Clarification

First of all, thanks for some thorough replies. I realise I made a mistake using the term "super user" in my question, as I did not mean in the "root" sense of the word. I am not running my machines as root.

I meant "super-user" in the sense that contrary to a normal user I do my own backups, I reinstall my machine fairly often, I dual-boot, I develop, run souce control software, I spread data over multiple drives for redundancy and so on. Normal users put their files where the system suggests, rarely if ever reinstall, keeps the default configuations of everything and so on. The difference there is what I meant by "super user". Sorry for being unclear.

I am also well aware of the ability to mount drives and partitions wherever I want. I do this already, but I ask myself - what do I gain from all this messing about? I keep my home over a reinstall, true - but the home directory has stuff I might want to get rid of alongside stuff I want to keep.

From windows I grew to hate the "my documents" mess, which always felt like a clumsy effort to copy the "home" mechanism from UNIX. As I now use a UNIX machine I am surprised that it seems that it's the mechanism itself that is clumsy. My home directory in OS X is as annoying a "home" as "my documents" in windows.

It's not a problem, as I gravitate towards simply ignoring the home directory completely. But is there something I am missing?

share|improve this question
    
i for one assumed you meant "super user" as in the name of the site.. eg, "power user" not "root/admin/Administrator". but thanks for the clarification. –  quack quixote Oct 5 '09 at 22:54

6 Answers 6

up vote 3 down vote accepted

Symbolic links. Or cd to a particular location. Whatever.

Windows uses the same concept of home directories, for what it's worth. That's where your user profile lives -- all your user's customizations, configurations, bookmarks files, whatever. Windows puts it in C:\Documents and Settings\%username%, Linux puts it in /home/$username, OSX uses (what? /Users/$username? I'm not sure).

But the home directory really doesn't need to be for a user's data. It's for per-user configuration files. Your data can be anywhere. If you're a sole user, you could even have your external drives mounted directly under your $HOME directory in whatever fashion you like.

Personally, I use symbolic links, and mount all data-oriented partitions under /media. I have a /personal folder that organizes symlinks directly into the /media tree for most-used data, and duplicate those symlinks (or shortened versions of them) under my $HOME directory.

As a Superuser, you can use whatever form you like.

share|improve this answer
    
+1 for describing how you personally handle it. Thanks. –  Console Oct 5 '09 at 22:49
    
What you are saying is basically what I suspected, the home folder idea is "weaker" than it used to be. Why don't I get drives mounted, or at least linked, to my home directory when I attach them? Why do I have to care about system folders in daily use? It seems to me that the concept is neither here nor there now. You have shortcuts and defaults that point you to the home directory but at the same time there's no downside to ignoring it. The dicipline of keeping a home directory is a suggestion more than a law. –  Console Oct 7 '09 at 8:04
    
Yeah, I think so. I find it too hard to backup and restore most of my user configuration during a system refresh. I do backup the home directory, but I don't restore all of it -- just a file here or there (think Firefox bookmarks or playlists or the iTunes library). Most of it is cruft from old programs that I won't reinstall so why restore it? Data -- mp3s, ebook libraries, etc -- is all stored on non-system partitions. To be fair, I like home dirs, for per-user config; I like not sharing my family's crazy stuff. But you're right, the home dir isn't where my digital stuff lives. –  quack quixote Oct 7 '09 at 14:09

The concept of a "computer desktop" as a single-user experience is apparently ingrained into you deeply. There is nothing wrong with having all of your data "external" of your home directory - in fact, this is just fine. I think what you need to do is decide what should and shouldn't be in your provided home directory.

Nothing stops you from creating empty stub directories that reside inside of root's home directory, and then mounting your external data there. Nothing stops you from keeping the existing OS X mounting system that shows up under /Volumes either. What you are saying is that you are struggling with yourself and how you manage the system.

If you want to be a true purist, you would have a regular account for day-to-day activities, and keep root for what it was meant to be - the account that administrates the system, not the account that goes web browsing. The idea helps delineate what is and isn't "yours", and it makes handling your data (and who owns it) much clearer. But this also seems lost to you, by virtue of wanting to be root.

Being root the entire time becomes a habit when you have to administrate a server every day. I know because I do this - it's a part of the job. But when I get home and fire up my Linux install, I use my "regular" account and don't bother being root. A smidgen of self-discipline will help you get over this, and trust me, you'll go farther with it.


A follow-up on handling data storage and partitions:

This isn't Windows, or DOS for that matter. This is power at its purest. You can merge different drives and volumes anywhere on the system. A directory anywhere can in turn really be a separate drive, and it's this unified file system tree view that perplexes you a bit. You're a bit like someone who's been in chains their whole life and once the shackles are removed, you're not too sure where to start, so you feel like you should continue to use the same methods you're used to using. Well...time for some lateral thought. :)

The system is virtually yours. There isn't someone standing over your shoulder watching what you do and type into it, nor is there the code of countless programmers leaving ghosts in the machine to stop you from doing something. You have, in a very real sense, absolute and ultimate power over your hardware. And with that, absolute power can be completely liberating, or completely corrupting. The bit earlier about not using root for everyday tasks - there are many good reasons for that.

Data management is just one facet of a system that has more or less organically evolved over decades by hundreds of people applying their insight to it. Part of that data management is understanding that other people may be living here, and as such, you should have some basic rules about what is "mine and thine". That's where home directories come in. The entire purpose of /home was to provide what its moniker meant - a home for users to be in, a place to "keep things" and "do things", and a place for the user's preferences.

Root needs a home unto itself because, well, it's no-one else's business what the administrator is doing, they have their own programs and data to deal with. The same concept of root needing its own home directory follows through, because while root is a special account, it's still just an account, abet one with special super powers.

But there are other good reasons to not be root all of the time. Running software that might have potential vulnerabilities to outside attack while as root opens your system to attacks committed with the same power as root - which is to say, total control. So privileged separation is a very big thing in Unix-land, and with good reason.

If all else fails, and you're having some issues trying to holistically digest these concepts, you might want to read an old (and somewhat dated) essay called In The Beginning Was The Command Line, which can be downloaded online, for free, from the author. While it is old, it is still relevant today, and within you'll start to get a sense of what you're in for.

share|improve this answer
    
Thanks Avery, good thoughts but I'm afraid I inadvertently misled you. I am familiar enough with unix having used it for over a decade. To rephrase my question: what point is there in sticking to the old concept of a home directory today, when you are in fact the sole user of the machine and regularly use resources that by default do not appear in the home directory? it's starting to feel a little like a nostalgic chore, if you see what I mean? –  Console Oct 5 '09 at 22:31
    
Ah, I see. However, the same practice - keeping the administrative account separate from the everyday account - is becoming quite commonplace in Windows administration. Sure, it's a single-user machine, but more and more people are being exposed to the concept of multiuser setups, even in Windows. I've known of a few families that maintain separate accounts, just to keep the wallpaper that the kids select from becoming the new "favourite" of the parent's account. So while it seems a bit nostalgic, in some ways, I feel the same way about single-user systems. You picks your poison, I guess. –  Avery Payne Oct 6 '09 at 0:22

As a superuser I use several external drives, memory sticks, backup devices etc. In fact, most of my data is there, not in the home directory.

Well, that's just a manner of personal choice.

I regularly reinstall my system, so I don't want my OS and data to reside on the same partition.

You're still thinking like Windows. In Linux, you can set any directory to be on a separate partition. In fact, a lot of people create two separate partitions, mounting them to / and /home, when installing Linux.

The home directory, even if I put it on a separate partition, is not big enough to store all the data I want to have at my fingertips.

If it's not big enough, then just use an external drive. The home directory is supposed to represent personal data on the current machine, not on any other device.

The home directory is also used by the system and misc apps that have already occupied a bunch of folders.

Well, unfortunately, that's mainly a result of Unix tradition. You'll notice that the My Documents folder is used the same way in Windows. (Despite Window having a perfectly fine alternative in AppData.) However, seeing these folders is probably your windows background making you want to look at hidden folders. Directories starting with a dot (.) are hidden under Linux-- and mainly it's for reasons like this, not to engage in the hand-holding Windows puts you through.

share|improve this answer
    
There is something to be said since Microsoft gets closer to the Unix paradigm. Now, Windows7 puts all users files in a C:\users\Username directory, making it even closer to Unix and the "home" directory idea. –  djangofan Oct 5 '09 at 22:58

A lot of this is in others' answers, but I'm trying to bring it together into something focusing on how to make it work for you.

  • As a superuser I use several external drives, memory sticks, backup devices etc. In fact, most of my data is there, not in the home directory.
  • The home directory, even if I put it on a separate partition, is not big enough to store all the data I want to have at my fingertips.

As ~quack suggests, you could easily symlink to all of your various external media from your home directory. The top level could even be nothing but a list of these links, if you so desire (perhaps with one real directory called 'local'). This of course solves your size problem too. None of the data will actually be within your home directory.

  • I regularly reinstall my system, so I don't want my OS and data to reside on the same partition.
  • The home directory is also used by the system and misc apps that have already occupied a bunch of folders.

This is why so many people mount a separate partition as /home. I don't know what distro you're using, but for example, Ubuntu's installer gives you the chance to create partitions and make this decision.

This plan-for-reinstall separation is, in my view, why it's a good thing that the home directory contains configurations for system/applications. If you reinstall your system, you can preserve your customizations. It is of course easy to keep your data separate from the hidden config, especially if you use that list of symlinks (+local) structure.

For the fact that your main location is in /home/, instead of just /home (assuming there will never be a second user)... Well, if you really wanted to, you could reconfigure your home directory to be /home and give yourself permissions there (by editing /etc/passwd). It doesn't seem like a huge deal to me, though - shells start in your home directory, and GUI methods always provide an easy way to access it. You never really see the top-level directories if you don't want to.

The main thing you should take away from this is that in the best tradition of Linux, you can generally customize things until they work the way you want them to.

share|improve this answer
    
+1, good explaination of why using /home actually helps when you plan for a re-install. –  Avery Payne Oct 5 '09 at 21:02
    
Thanks Jefromi. A quick point - shells start in my home, which would be useful if that was indeed my "root". since most of my data by default gets mounted in /volumes or /mnt and such I usually just navigate out of there first thing I do. I can customize all this of course, but isn't that starting to feel like jumping through hoops? –  Console Oct 5 '09 at 22:43
    
Hm, so the difference you're looking for is really very small - you want the distribution to automatically put a bunch of things from /volumes or /mnt into your home directory. Fair enough. Perhaps a reason this hasn't happened is that it's kind of a user-friendliness issue, which tends to get work mostly in the desktop environment area - and we already see mounted devices appearing on desktops and in file managers. –  Jefromi Oct 6 '09 at 21:24

If you cat /etc/passwd you'll see there are a lot of other users on your system, they just aren't human. =)

Also, the idea of a home directory is that it gives you (and the programs you run) a place to do anything you want. That means if there's a security hole in your web browser it can only write to $HOME and not somewhere dangerous like /sbin.

share|improve this answer
    
That's a good point, but on a modern "desktop" unix (Linux, Mac OS X), when I connect external drives they auto-mount (horrible in itself) and I can read and write to them without havng to switch user context or assign permissions. So I am enabled, and in some ways even encouraged, to "do what I want" also in other places. I think what is going on is a slow adjustment of Unix as it used to be towards unix as a convenient single-user system. Some of the familiar concepts will have change I guess. –  Console Oct 9 '09 at 7:56

Well, I am the only use on my Mac, and backups are a sinch seeing I store all my data (Downloads, documents, junk, development, pictures) in my home folder, and my media (movies, music, photo library) on external drive(s). If I need to backup, all I do is copy my home folder to whatever backup medium I choose.

I think Avery Payne got it right:

The system is virtually yours. There isn't someone standing over your shoulder watching what you do and type into it, nor is there the code of countless programmers leaving ghosts in the machine to stop you from doing something.

Stop worrying about whether you are doing it the 'right way' or not. Just do it!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.