macOS Symbolic Link – How to Share Home Folders Between Operating Systems


After my hard drive calved yet again in my MacBook Pro, I decided to re-do my dual booting. My goal is to triple boot, with OSX 10.6.8 (installed), Windows 7 Home Premium and a flavour of Linux (undecided at this point). I know that I should not do a hard link of my entire home folder between the three operating systems, but I would like one partition at the end of the drive for data (i.e. Documents, Pictures, Movies, Downloads and Music), and have them just linked into my home folder.

I have a FAT32 partition as the end of the drive for my data that I want between the three OSes. What I want is to have these 5 "main" folders live there, and have each OS just "link" their counter-parts to these folders. I can easily do it in Windows 7 by right-clicking the folder in my User directory, selecting Properties->Location and browse to the folder. How can I accomplish this on Mac OSX 10.6?

EDIT @OliverSalzburg mentioned this question/answer on the Apple StackExchange, but to no avail. I enabled the root account as described there, created my folders in my extra partition (/Volumes/DATA/{foldername}), and tried making the link as root (ln -s /Volumes/DATA/Movies /Users/luke/Movies), but it kept telling me the folder exists. I deleted /Users/luke/Movies, then repeated the above command. When I did, it gives me a "broken alias", as in, that it looks like the blank sheet of paper with the small arrow overlay, and it telling me to either fix or delete the alias. Not what I wanted.

My end goal is that the regular paths for the above 5 folders exist, and appear to be the exact same as if the data was stored on the Mac partition

Best Answer

Since OSX is Unix based you can make a symbolic link with ln or just use mount to mount the partition to a folder and edit fstab with vifs.

  1. ln -s SOURCE TARGET
  2. To mount:

Find UUID:

  • the UUID can be found in Disk Utility (File > Get Info on a volume)
  • the UUID can also be found using diskutil info /Volumes/yourVolumeName in Terminal
  • the preferred way to edit /etc/fstab is now by using the command sudo vifs, but that means you have to edit using Vim. Vim can be learned by typing the command vimtutor. I just used sudo nano /etc/fstab because I didn't know at the time.

So now use vifs and add a line:

UUID=FAB060E9-79F7-33FF-BE85-E1D3ABD3EDEA  /path/to/folder    hfs    rw
Related Question