How to mount an NFS export on macOS

An NFS export lets a macOS client attach a directory from a Unix or Linux file server under a local path such as /Volumes/projects. Manual mounting is useful when the server path, client access rule, or permission mapping needs to be confirmed before adding any automatic mount configuration.

macOS includes the mount_nfs helper and normally calls it through mount -t nfs. The server must already export the directory to the Mac, and the local mount point must be empty before the remote filesystem is attached.

Use an explicit NFS version when the server owner gave one, and add resvport when the server requires client connections from a reserved port. The mounted directory uses server-side Unix permissions and ID mapping, so a successful mount can still show permission errors if user IDs, groups, root squashing, or NFSv4 identity mapping do not line up.

Steps to mount an NFS export on macOS:

  1. Open Terminal on the Mac.
  2. Confirm the server advertises the export to the client network.
    $ showmount -e files.example.net
    Exports list on files.example.net:
    /srv/nfs/projects 192.0.2.0/24

    Some NFSv4-only servers do not answer showmount. If the server owner already gave the exact export path, continue with the mount test and use the server logs or export list to troubleshoot failures.

  3. Create the local mount point under /Volumes.
    $ sudo mkdir -p /Volumes/projects

    Files already inside the mount point become hidden while the NFS export is mounted there.

  4. Mount the export on the local path.
    $ sudo mount -t nfs -o vers=4,resvport files.example.net:/srv/nfs/projects /Volumes/projects

    Use the version and security options required by the server, such as vers=3 for an older export or sec=krb5 for a Kerberos-protected export.

  5. Verify that macOS mounted the expected NFS source.
    $ mount -t nfs
    files.example.net:/srv/nfs/projects on /Volumes/projects (nfs, mounted by admin)
  6. List the mounted directory as the user who needs access.
    $ ls /Volumes/projects
    README.txt  reports

    If the listing fails with Permission denied after the mount succeeds, check the export rule, server filesystem permissions, UID/GID mapping, root_squash behavior, and any NFSv4 domain mapping required by the server.