How to Setup NFS (Network File System) on RHEL/CentOS/Fedora and Debian/Ubuntu

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Tarunika Shrivastava

I am a linux server admin and love to play with Linux and all other distributions of it. I am working as System Engineer with a Web Hosting Company.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Linux BASH Programming Cookbook
Getting Started with Ubuntu 16.04
A Newbie's Getting Started Guide to Linux
Introduction to Linux - A Hands on Guide

81 Responses

  1. anupriya says:

    very very very clearly explained..
    thank you so much..keep up the good work

  2. msp says:

    can u plese explain about the no_root_squash and root_quash with some real time example… im little bit confused with it

    • krish says:

      By default, NFS shares change the root user to the nfsnobody user, an unprivileged user account. In this way, all root-created files are owned by nfsnobody, which prevents uploading of programs with the setuid bit set.
      If no_root_squash is used, remote root users are able to change any file on the shared file system and leave trojaned applications for other users to inadvertently execute.

  3. Shay Tomas says:


    Would this work to mount an entire raid from one Red Hat Server to an Ubuntu server? How can I mount the entire raid volume? Thanks!


    what should be the entry of fstab for mounting the nfs share directory using user name and password

    • Ravi Saive says:


      To mount nfs share with username and password in Linux, you should add following entry in your fstab file. /mnt nfs user=administrator,password=pass 0 0

      And don’t forget to change above values as per your requirements.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 300K+ Linux Users
  1. 177,942
  2. 8,310
  3. 37,548

Are you subscribed?