To mount an NFS (Network File System) share on macOS X, you can use the mount
command with the -t nfs
option. This will allow you to mount an NFS share from a remote server and access the files on the share as if they were stored locally on your macOS X system.
To mount an NFS share, you will need to know the hostname or IP address of the NFS server, as well as the path to the share on the server. For example, if the hostname of the NFS server is server1
and the path to the share is /exports/share1
, you can mount the share using the following command:
sudo mount -t nfs server1:/exports/share1 /mnt/share1
This will mount the /exports/share1
share from the server1
NFS server at the /mnt/share1
directory on your macOS X system. You can then access the files on the share by navigating to the /mnt/share1
directory.
To automatically mount the NFS share when your macOS X system starts, you can add an entry to the /etc/fstab
file. For example, to mount the /exports/share1
share from the server1
NFS server at the /mnt/share1
directory, you can add the following line to the /etc/fstab
file:
server1:/exports/share1 /mnt/share1 nfs rw,auto,noatime,nolock,bg,nfsvers=3,intr,tcp,actimeo=1800 0 0
This will automatically mount the /exports/share1
share from the server1
NFS server at the /mnt/share1
directory when your macOS X system starts.
By using the mount
command and the /etc/fstab
file, you can easily set up an NFS client on your macOS X system and mount NFS shares from remote servers.