Skip to content

NFS Client

Klemen edited this page Jan 9, 2020 · 1 revision

Now is the time to make some simple configurations to the client machine, so that the shared folder from the host can be mounted to the client and then accessed smoothly.

Step 1: Install NFS Common

Before installing the NFS Common application, we need to update our system’s repository index with that of the Internet through the following apt command as sudo:

$ sudo apt-get update

Now, run the following command in order to install the NFS Common client on your system:

$ sudo apt-get install nfs-common

The system will prompt you with a Y/n option to confirm if you want to continue with the installation. Please enter Y and then hit Enter to continue, after which the software will be successfully installed on your system.

Step 2: Create a mount point for the NFS host’s shared folder

Your client’s system needs a directory where all the content shared by the host server in the export folder can be accessed. You can create this folder anywhere on your system. We are creating a mount folder in the mnt directory of our client’s machine:

$ sudo mkdir -p /mnt/sharedfolder_client

Step 3: Mount the shared directory on the client

The folder that you created in the above step is like any other folder on your system unless you mount the shared directory from your host to this newly created folder.

Use the following command in order to mount the shared folder from the host to a mount folder on the client:

$ sudo mount serverIP:/exportFolder_server /mnt/mountfolder_client

In our example, we are running the following command to export our “sharedfolder” from the server to the mount folder “sharedfolder_client” on the client machine:

$ sudo mount 192.168.100.5:/mnt/sharedfolder /mnt/sharedfolder_client