Installing the NFS client on Ubuntu gives a host the helper commands it needs to discover and mount exports from an NFS server. The supported package-manager path is the distribution nfs-common package, which keeps mount.nfs, showmount, identity mapping, and Kerberos-capable client components aligned with Ubuntu updates.
The package does not turn the Ubuntu machine into an NFS server. It installs the user-space client tools used by mount, supporting files such as /etc/nfs.conf and /etc/idmapd.conf, and service units that are used when a mount requires client-side daemons.
The install is complete when apt reports nfs-common installed, mount.nfs is available, and a known server export can be queried or mounted through the network. The smoke-test commands use files.example.net:/srv/nfs/projects; replace that with an export already allowed for the client.
Steps to install an NFS client on Ubuntu:
- Open a terminal with sudo privileges.
- Refresh the package index.
$ sudo apt update
- Install the NFS client package.
$ sudo apt install --assume-yes nfs-common
The nfs-common package installs client-side utilities such as mount.nfs and showmount. Server-side exports still require nfs-kernel-server on the host that shares the directory.
- Confirm the package is installed.
$ dpkg-query -W nfs-common nfs-common 1:2.8.5-1ubuntu1
The exact package version can differ between Ubuntu releases and update pockets.
- Confirm the NFS mount helper is available.
$ mount.nfs --version mount.nfs: (linux nfs-utils 2.8.5)
- Query a known NFS server if one is already available.
$ showmount --exports files.example.net Export list for files.example.net: /srv/nfs/projects 192.0.2.0/24
Some NFSv4-only servers do not expose the older mount discovery service used by showmount. If the export path is known, test the mount directly instead.
- Create an empty local mount point for a manual smoke test.
$ sudo mkdir --parents /mnt/projects
Files already inside the mount point become hidden while the NFS filesystem is mounted there.
- Mount the known export.
$ sudo mount -t nfs files.example.net:/srv/nfs/projects /mnt/projects
- Confirm the client mounted the export.
$ findmnt /mnt/projects TARGET SOURCE FSTYPE OPTIONS /mnt/projects files.example.net:/srv/nfs/projects nfs4 rw,relatime,vers=4.2,##### snipped #####
- Unmount the temporary test mount.
$ sudo umount /mnt/projects
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.