Skip to content

Instantly share code, notes, and snippets.

@michaelsauter
Last active December 11, 2015 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelsauter/ea32e13fe75a685a2cd0 to your computer and use it in GitHub Desktop.
Save michaelsauter/ea32e13fe75a685a2cd0 to your computer and use it in GitHub Desktop.
# Setup NFS share between Mac (client/host) and Debian/Ubutnu (server/guest)
# Find out IP of host (host-only adapter, sth like vboxnet0 (check settings of guest in Virtualbox). The IP should be sth like 192.168.56.1)
ifconfig
# Get NFS on the guest system
sudo apt-get install nfs-kernel-server nfs-common portmap
# Find out user ID and group ID of your user on the guest system (likely 1000/1000)
id
# Edit /etc/exports
sudo vim /etc/exports
# Insert the user/group IDs and the IP of the host
/myproject 192.168.56.1(rw,async,all_squash,insecure,anonuid=1000,anongid=1000,no_subtree_check)
# Export new settings
sudo exportfs -ra
# Restart server
sudo /etc/init.d/nfs-kernel-server restart
# Now you can connect via Finder > Go > Connect to Server
nfs://your-guest.vm/the/exported/folder
# Alternatively on the console:
mkdir /mnt/myproject
mount your-guest.vm:/myproject /mnt/myproject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment