How to remove ‘/home’ directory

filesystemsymlink

OS X 10.9.5.

I have a /home directory in my filesystem. I want to remove it and create a symlink named /home pointing to /Users to make symlinks from GNU/Linux usable. But I cannot remove /home directory (rmdir: home: Resource busy) nor create any file under /home (Operation not supported).

Any solution?

Edit:
As @thomasjones pointed, there's really something mounted at /home. But what is that map auto_home?

$ df
Filesystem    512-blocks      Used Available Capacity  iused   ifree %iused  Mounted on
/dev/disk0s2   624470624 579889472  44069152    93% 72550182 5508644   93%   /
devfs                371       371         0   100%      643       0  100%   /dev
map -hosts             0         0         0   100%        0       0  100%   /net
map auto_home          0         0         0   100%        0       0  100%   /home

Best Answer

  • Open the following files with read/write permissions:

    /etc/auto_home
    /etc/auto_master
    

    These files are part of the autofs installation.

    In the auto_home file, add a # before the + on the following line:

    +auto_home # Use directory service

    In the auto_master file, add a # before the /home on the following line:

    /home auto_home -nobrowse,hidefromfinder

    Save both files, and reboot your computer. /home should be free to work with.

    To reverse the changes, undo what you've done to both auto_master and auto_home.