Once an NFS server is exporting a share, macOS gives you several ways to mount it: Finder's "Connect to Server", the mount_nfs command, the built-in /net automounter, and persistent automounter maps via /etc/auto_master. This guide covers each method and the mount options you need to know.
Before You Begin
You will need:
- The hostname or IP address of the NFS server
- The export path on that server (for example
/Usersor/volume1/shared) - Administrator access on your Mac for
sudocommands - Network reachability to the server on TCP/UDP port 2049
If you still need to set up the server side, see How to Enable NFS Network Shares on macOS.
Method 1: Mount From Finder (Connect to Server)
The easiest one-off mount uses Finder's built-in URL handler.
- In Finder, choose Go > Connect to Server (or press Command + K)
- Enter the NFS URL in the form:
nfs://server.example.com/export/path - Click Connect
- The share appears in the Finder sidebar under Locations and is mounted at
/Volumes/path
Finder mounts are convenient but limited — you cannot pass mount options like resvport or nolocks, so they fail against servers that require a reserved source port. Use the CLI method below for anything beyond casual access.
Method 2: Mount From the Command Line
mount_nfs gives you full control over mount options. This is the method most IT professionals use.
- Create a local mount point:
sudo mkdir -p /mnt/nfs-share - Mount the share with recommended options:
sudo mount_nfs -o resvport,nolocks server.example.com:/export/path /mnt/nfs-share - Verify the mount with:
mount | grep nfs
To unmount: sudo umount /mnt/nfs-share
Common Mount Options
| Option | Purpose |
|---|---|
resvport | Use a reserved source port (<1024) — required by most servers |
nolocks | Disable network locking — fixes hangs against servers without lockd |
rw / ro | Mount read-write or read-only |
soft | Fail operations after retrans attempts instead of blocking |
hard | Retry indefinitely on server failure (default; safer for writes) |
intr | Allow signals to interrupt a stuck NFS operation |
vers=3 | Force NFSv3 (default on macOS is NFSv3) |
rsize / wsize | Read/write block size in bytes (tune for throughput) |
A typical production mount command looks like this:
sudo mount_nfs -o resvport,nolocks,hard,intr,rw server:/export/data /mnt/data
Method 3: The /net Automounter
macOS ships with an always-on automount path at /net that mounts NFS exports on demand.
- In Terminal, run:
cd /net/server.example.com/export/path - The share mounts automatically under
/net/server.example.com/ - When you leave the directory and it goes idle, the automounter unmounts it after a short timeout
You can also type /net/server.example.com into Finder's Go to Folder (Shift + Command + G) to browse all exports on that host. The /net path is great for quick ad-hoc access but uses default mount options, so it will not work against servers that require resvport.
Method 4: Persistent Mounts via /etc/auto_master
macOS does not use /etc/fstab — the supported way to make NFS mounts persistent is through the automounter.
- Edit the master map:
sudo nano /etc/auto_master - Add a line pointing at a custom map file:
/- auto_nfs -nobrowse,nosuid - Save and exit, then create the map file:
sudo nano /etc/auto_nfs - Add one line per share, in the form
<local-path> <options> <host>:<export>:/mnt/data -fstype=nfs,resvport,nolocks,rw server.example.com:/export/data - Make sure the mount point exists:
sudo mkdir -p /mnt/data - Reload the automounter to apply changes:
sudo automount -vc
The share now mounts automatically on first access and stays available across reboots. To remove a persistent mount, delete the line from /etc/auto_nfs and run sudo automount -vc again.
Troubleshooting
"Operation not permitted" or "access denied by server"
The server requires a reserved source port. Add -o resvport to your mount_nfs command or to the options in /etc/auto_nfs. Finder's nfs:// handler cannot set this option — use the CLI instead.
Mount hangs or ls stalls forever
The server is not running rpc.lockd, or its lock ports are firewalled. Add -o nolocks to the mount options. You can also try -o soft,intr so stuck operations can be interrupted with Control + C.
Permission denied on files after mounting
This is almost always a UID mismatch. NFSv3 authenticates by numeric UID/GID, not username. Check your UID with id -u on the client and compare it to file ownership on the server. Fix by aligning UIDs, using -maproot=<uid> / -mapall=<uid> on the server export, or migrating to NFSv4 with ID mapping.
"Stale NFS file handle"
The server restarted or the export was removed and recreated while your mount was still active. Force-unmount and remount:
sudo umount -f /mnt/nfs-share && sudo mount_nfs -o resvport,nolocks server:/export /mnt/nfs-share
Connection refused or timeouts
Verify the server is reachable on port 2049 with nc -vz server.example.com 2049. Check the macOS firewall, any router ACLs, and confirm the server's export list with showmount -e server.example.com. If showmount itself fails, portmapper (port 111) is likely blocked.