Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

While a similar question was raised here, it doesn't seem to be a solid answer but more of a theory. In addition my case is a bit different as you will see below.

MacBook Air view

You will note that I have two home drives, one being a mount to a share on my NAS and the other in question being the one within localhost.

What value do the home and net drives within localhost serve other than being part of default *nix folder structure? Is this anything more than a local representation that exists by *nix default? Is it safe to eject these drives or is the OS using them in some fashion which may not be readily apparent?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

The whole "root" directory you picture, and finder shows actually does not exist at all. It's kind of a "meta" directory. The unix root directory (e.g. /) points to the folder OS X calls "Macintosh HD". Everything is a sub-directory of that, even other drives.

Basically, when you connect a external drive, insert a CD, mount a DMG, or map a network drive, the resources contained within the new drive are actually made available (called "mounting") as a subdirectory of /Volumes/[Drive name here].
Finder (and finder only) has a facility that shows a fake-directory that contains all the mounted drives.

In other words, the reason you can have two home directories is because they're not actually in the same folder. One is actually located at /Volumes/home and the other is /home.

Anyways...


The home and net directories actually exist as folders on your main drive. If you open the root directory of your drive (IN your picture, its labeled "Macintosh HD"), you'll see where they are actually located.

The home directory seems to be related to enterprise environments, where various network drives can be defined using a directory service. I believe that, in such a situation, the automounted drives appear in /home/[Network drive name], rather then the OS X traditional /Volumes/[Drive name]. In any event, it's part of the autofs underpinnings of OS X. More here.

The /net directory also seems to be related to the automounter. There is a thread about it on the apple support forums here.

/net is built into the automounter in OS X and uses the special map -hosts. This built in map will consist of the exports from the named server, when that server is accessed via the /net path. For example, if I have an NFS server at the IP address 192.168.1.10 and it exports a directory /exports, then if I do this from my Mac:

prompt$ cd /net/192.168.1.10/exports

the Mac automounter will contact the server, mount the export, and put me in that directory. All without me having to issue any "mount" command.

As such, it may be possible to use the /net directory as a shortcut to access network drives, assuming you're working from the command line. It doesn't seem to work for SMB (i.e. windows) shares (at least for me), though.

Incidentally, if you want to look at what's mounted where, all you have to do is open a command-prompt, and type mount. It will return a list of all the drives your computer has, and where they are mounted.

share|improve this answer
    
It sounds like they are part of the underpinnings of OS X and have no real benefit other than being just that, underpinnings. While they could be used for certain scenarios it doesn't sound conducive or the norm in an OS X environment. Thanks for the great write up! –  Aaron McIver Nov 27 '12 at 4:21
add comment

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.