Skip to main content
macOSintermediate

How to Mount an NFS Share on macOS

Learn how to mount NFS shares on macOS using Finder, mount_nfs, the /net automounter, and persistent mounts via /etc/auto_master and /etc/auto_nfs.

6 min readUpdated April 2026

Want us to handle this for you?

Get expert help →

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 /Users or /volume1/shared)
  • Administrator access on your Mac for sudo commands
  • 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.

  1. In Finder, choose Go > Connect to Server (or press Command + K)
  2. Enter the NFS URL in the form: nfs://server.example.com/export/path
  3. Click Connect
  4. 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.

  1. Create a local mount point: sudo mkdir -p /mnt/nfs-share
  2. Mount the share with recommended options: sudo mount_nfs -o resvport,nolocks server.example.com:/export/path /mnt/nfs-share
  3. Verify the mount with: mount | grep nfs

To unmount: sudo umount /mnt/nfs-share

Common Mount Options

OptionPurpose
resvportUse a reserved source port (<1024) — required by most servers
nolocksDisable network locking — fixes hangs against servers without lockd
rw / roMount read-write or read-only
softFail operations after retrans attempts instead of blocking
hardRetry indefinitely on server failure (default; safer for writes)
intrAllow signals to interrupt a stuck NFS operation
vers=3Force NFSv3 (default on macOS is NFSv3)
rsize / wsizeRead/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.

  1. In Terminal, run: cd /net/server.example.com/export/path
  2. The share mounts automatically under /net/server.example.com/
  3. 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.

  1. Edit the master map: sudo nano /etc/auto_master
  2. Add a line pointing at a custom map file:
    /-              auto_nfs        -nobrowse,nosuid
    
  3. Save and exit, then create the map file: sudo nano /etc/auto_nfs
  4. 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
    
  5. Make sure the mount point exists: sudo mkdir -p /mnt/data
  6. 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.


Frequently Asked Questions

Find answers to common questions

macOS mount_nfs defaults to using a non-reserved (>1024) source port, but most Linux and BSD NFS servers require clients to connect from a reserved port (<1024) for security. Adding -o resvport forces macOS to use a privileged source port so the server will accept the connection. Without it you typically see "Operation not permitted" or "access denied by server" errors.

nolocks tells the client not to use the NFS lock manager (rpc.lockd). Many consumer NAS devices and older NFS servers either do not run lockd or block its ports, which causes mounts to hang or file operations to stall. Setting -o nolocks (or locallocks) avoids network locking and handles locks on the client only. Do not use it when multiple hosts need to coordinate file locks on the same share.

macOS does not use /etc/fstab the way Linux does. The supported way to create persistent NFS mounts is the automounter: add an entry to /etc/auto_master pointing at a map file such as /etc/auto_nfs, list your shares in that map, and reload with sudo automount -vc. The mount is then available automatically whenever the path is accessed.

/net is a built-in macOS automounter path that mounts any NFS export on demand. Typing cd /net/server.example.com/export/data (or navigating there in Finder) automatically mounts the share read-only and unmounts it after idle. It is the fastest way to access an ad-hoc NFS share without editing any config files, but it assumes the server allows anonymous or UID-matched access.

The two most common causes are reserved port requirements (fix with -o resvport) and UID mismatches between client and server. NFSv3 identifies users by numeric UID, so if your macOS user is UID 501 but the server expects UID 1000, you cannot read files owned by that user. Either align UIDs, use -maproot/-mapall on the server, or switch to NFSv4 with ID mapping configured.

Run sudo umount /path/to/mountpoint or diskutil unmount /path/to/mountpoint. If the share is unresponsive (stale file handle or network outage), use sudo umount -f /path/to/mountpoint to force it. For automounted shares under /net, they unmount automatically after a short idle timeout — you do not need to unmount them manually.

Need Professional IT & Security Help?

Our team of experts is ready to help protect and optimize your technology infrastructure.