BlogWikiAbout

Kyle Pericak

"It works in my environment"

Created: 2020-03-09Updated: 2020-03-09

Ubuntu NFS Server Setup

Category:systems administrationTags:ubuntunfs
Install and configure an NFS server on Ubuntu 18.04 with nfs-kernel-server, set up /etc/exports for a subnet, apply with exportfs, and mount from a client.

Install & Configure NFS Server

These steps were tested on Ubuntu 18.04.

# Install the NFS server package
apt-get install nfs-kernel-server

# Make a directory to publish
mkdir /nfs

# Set permissions
chown nobody:nogroup /nfs
chmod 777 /nfs

Configure NFS by writing /etc/exports. In this example I'm allowing access from anyone on the 10.10.0.0/16 subnet. This is only secure if you trust that entire subnet and any systems which might be routed to it.

/nfs 10.10.0.0/16(rw,sync,no_subtree_check)

Apply the changes

exportfs -a
systemctl restart nfs-kernel-server

NFS client setup

# Install client software
apt-get install nfs-common

# Create mount point
mkdir /nfs

# Mount the NFS share manually
mount 10.10.10.9:/nfs /nfs
Blog code last updated on 2026-04-16: 8579f34f0a3ec5b8043d5eade8e87124d41cf83b