Ubuntu: Let’s mount a ‘NFS Share’.

NFS (Network File System) allows you to access shared directory from Linux preserving Files and Directories Ownerships and Permissions.

The computer sharing the directory is called the ‘NFS Server’ (it can be NAS server, for example) and the computers or devices connecting to that server are called ‘NFS clients’. Clients need to use the mount command to access the shared directory.

nfs-common package is needed, let’s install it via APT:

root@test:~# apt-get install nfs-common

List All Shared Directories from :

root@test:~# showmount -e <Server-IP>
Export list for <Server-IP>:
/Public
/Download

Mount Shared Directory (from Client):

root@test:~# mkdir /nfs
root@test:~# mount -o soft,intr,rsize=8192,wsize=8192 \
             <Server-IP>:/Public /nfs

Mount NFS Automatically After Reboot:

root@test:~# vim /etc/fstab

Append the following line:

<Server-IP>:/Public /nfs nfs soft,intr,rsize=8192,wsize=8192

Note: Specific options can be found via MAN Pages or consulting Linux Official Documentation.


Comments are closed.