Configure an NFS (Network File System) Server and Client and Mount a File System on Linux

30 minutes
  • 5 Learning Objectives

About this Hands-on Lab

In this lab, we’ll create an NFS server, as well as create and export a file system. We’ll then configure an NFS client, mount the file system from the server, and check our mount statisitics.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Install, Enable, and Start the NFS Server (Server1)
  • Install the NFS package.
  • Start the NFS server package.
  • Enable the NFS server package.
Create the File System and Change the Required Permissions
  • Create the file system.
  • Change the file system permissions to the requested permisisons.
Configure the File System to be Exported, Export the File System, and Verify the Exported File System
  • Configure the file system to be exported.
  • Export the file system.
  • Verify the file system was exported.
Add the NFS Client Utilities to the Client Server (Server2) and Mount the File System
  • Install the NFS client utilities.
  • Mount the NFS file system.
  • Verify the mounted file system.
Check the Mount Statistics
  • Verify there are no errors in the mount statistics.

Additional Resources


The Applications team at XYZ Company would like an NFS file system, named /apps1, with read and write permissions. As per company standards, the team has their directories created on server1 and then exported to and mounted on the application server, server2. To complete this lab, create the share and export it on server1, then mount it on server2, and check the mount statistics to verify that there are no errors.

Your lab contains 2 Cloud Server instances. Open 2 Terminal tabs and log in to both of the provided server instances using the credentials provided. Use one of these instances for server1 (the server) and use the other for server2 (the client):

ssh cloud_user@<PUBLIC_IP_OF_NODE>

Become the root user:

sudo -i

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?