MacOS: Automounting NFS shares
If you come from Linux, the way MacOSes’ does network mounts may seem baroqe to you. So here’s how you mount an NFS network mount on a Mac.
First edit /etc/auto_master to add the line shown at the bottom of the file.
# # Automounter master map # +auto_master # Use directory service /net -hosts -nobrowse,hidefromfinder,nosuid /home auto_home -nobrowse,hidefromfinder /Network/Servers -fstab /- -static /- auto_nfs -nobrowse,nosuid
Then create the file /etc/auto_nfs referenced in the auto_master file. Make sure it as permissions of 0644. For some weird reason MacOS no longer allows you to mount to /Volumes. Not sure why. So choose another destination. For example I use /media.
/media/localmountpoint -fstype=nfs,noowners,nolockd,noresvport,hard,bg,intr,rw,tcp,nfc nfs://yournfsserver.example.com/remotedir
Now get the automounter to activate the mounts as follows:
And you should see the remote mounts. Make sure of course that the remote server allows you to mount its remote drives. On Linux, you have to edit /etc/exports, followed by an exportfs -a command.