+44 151 528 8706 [email protected]

How to Mount an NFS Share in Linux

Network File System (NFS) is a distributed file system protocol that allows you to share remote directories over a network. With NFS, you can mount remote directories on your system and work with the remote files as if they were local files.

On Linux and UNIX operating systems, you can use the mount command to mount a shared NFS directory on a particular mount point in the local directory tree.

In this tutorial, we will show you how to manually and automatically mount an NFS share on Linux machines.

Installing NFS Client Packages

To mount an NFS share on a Linux system first you’ll need to install the NFS client package. The package name differs between Linux distributions.

Installing NFS client on Ubuntu and Debian:

sudo apt update
sudo apt install nfs-common

Installing NFS client on CentOS and Fedora:

sudo yum install nfs-utils

Use the steps below to manually mount a remote NFS share on your Linux system:

1) First, we need to authorize our server to the remote server.
To do so, login as root on the remote server and install NFS using the steps listed above.
Then navigate to /etc and create a new file called exports.
cd /etc > to change the directory to /etc

nano exports > nano is a great file editor.
Now put the following:
This means has access to this machine’s directory /home/backups.
2)Now, on the remote create the directory /home/backups by executing the command.
mkdir /home/backups (Please note you need to change with your IP and you can choose any directory as long as it has enough space.)
3) Now, we mount:
sudo mount -t nfs /backups

Where is the IP address of the NFS server, /backups is the directory that the server is exporting and /home/backups is the local mount point.

On success, no output is produced.

To unmount execute the following command:

sudo umount

Please note that sometimes, firewalls can cause issues and you need to whitelist IPs, and open the following ports: 111, 2049.

Want your server mounted by a I.T professional? [Contact Us]

How to start a web hosting business?

A web hosting service is a type of Internet hosting service that hosts websites for clients, i.e. it offers the facilities required for them to create and maintain...

How to install Plesk on CentOS

Plesk is a commercial web hosting and server data center automation software with a control panel developed for Linux and Windows-based retail hosting...

Plesk vs cPanel

When choosing between web hosting control panels, it’s often a toss-up between Plesk or cPanel. Between them, they dominate the market for users looking for account and server...

We're Here To Help!

9 + 6 =

Head Office

Ukshin Kovaçica, 10,000 Pristina, Republic of Kosovo

Call Us

+44 151 528 8706