Howtos / Articles

Adding a NFS share to Ubuntu

The NFS (Network File System) file system allows client machines to access files from another computer/server over a network connection. It was originally developed in 1984, and is still in wide use today. It is typically used with Unix/Linux systems, however many other operating systems contain support for NFS, whether that be inbuilt into the OS, or via 3rd party applications.

More information on NFS can be found on Wikipedia.

NFS is a great way to share out a bunch of .iso image files so that an ESX/vSphere server can access the files remotely.

The details below outline how to install a NFS server, and configure it for a simple share. The example was done on Ubuntu, so the installation and configuration procedure may differ slightly if using a different OS/distribution.

Install the packages required to set up a NFS server (if it has already been installed, skip this step).

sudo apt-get -y install portmap nfs-kernel-server

Modify the /etc/exports file to set up the folder you want to share out via NFS.

sudo nano /etc/exports

You will need to add a line to the bottom of the exports file in the format below

/path/to/share    ipaddress/subnetmask(options)

So for example, if you wanted to share out /mnt/storage/ISO for your LAN subnet of, and make it read only, you would add the following line:


Update the NFS server with any changes to the exports file.

sudo exportfs -ra

Make sure you run this command whenever changes to /etc/exports has been made.

If you would like further information on what settings are available to use in the /etc/exports file, please view the exports man page by running:

man exports

You should now be able to access this remote share from another machine on the network. Also make sure that no firewalls are blocking the connection to the NFS server.

Share this howto article!
  • Facebook
  • Twitter
  • Reddit
  • email

Leave a Reply




You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>