macOS X Mount NFS Share / Set an NFS Client

To mount an NFS (Network File System) share on a macOS X system, you can use the mount command. Here’s an example:

mount -t nfs -o resvport <NFS-server-name>:<remote-directory> <local-mount-point>

In this command, <NFS-server-name> is the name or IP address of the NFS server, <remote-directory> is the path to the directory you want to mount, and <local-mount-point> is the location where the NFS share will be mounted on the local file system. The -t nfs option specifies that the file system type is NFS, and the -o resvport option tells the mount command to use a reserved port when connecting to the NFS server.

To make the NFS share persist across reboots, you’ll need to add an entry to the /etc/fstab file. For example:

<NFS-server-name>:<remote-directory> <local-mount-point> nfs rw,resvport 0 0

In this line, <NFS-server-name> and <remote-directory> are the same as before, <local-mount-point> is the location where the NFS share will be mounted, and the rw option specifies that the share can be read from and written to.

Leave a Comment