Skip to content

Instantly share code, notes, and snippets.

@viktorsteinwand
Forked from mowings/gist:9782264
Last active August 29, 2015 14:22
Show Gist options
  • Save viktorsteinwand/b004f65fcc41d6ac7819 to your computer and use it in GitHub Desktop.
Save viktorsteinwand/b004f65fcc41d6ac7819 to your computer and use it in GitHub Desktop.

On the mac, edit /etc/exports and add a line like so:

"/Users/<username>/develop/" -network 10.211.55.0 -mask 255.255.255.0  -mapall=<username>

The network and mask parameters indicate what hosts we'll share with; in my case, this network is used by the parallels shared network adapter; yours may differ.

You may need to reload nfsd:

sudo nfsd update

And you can check to see that the mounts are indeed exported

showmount -e

On the Linux host, just install the nfs utilities and mount as you normally would. Something like:

mount -t nfs -o proto=tcp,port=2049 10.211.55.2:/Users/<username>/develop  /mnt/develop

The IP in this case is the ip the guest sees for the host. On a linux box, I just use the who command to get this.

Note that if you get a "bad superblock" or other error here, you probably neglected to install an nfs client, and are a big dummy. On ubuntu, you would do an apt-get install nfs-common. Non-apt distributions will differ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment