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. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  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.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

119 Responses

  1. Ghata Saxena says:

    Hi,

    I have mounted directory from windows server to Linux server. When I run mount -a on Linux server, it gives error:

    mount.nfs: /directory_name is busy or already mounted.
    

    I want to know the root cause for this. I know this can be solved by unmounting that directory and mounting again but what is the root cause?

  2. RL says:

    This information is spread out in so many places across the web, so thank you for this concise write-up.

    I got this up and running except I’m unable to permanently mount the export directory so that my client automatically loads it. I did something bad to fstab and my computer (R Pi) would not boot. Had no choice but to reformat it.

    Got it to work fine by manually mounting, so I know I’m close…thanks for any pointers!

  3. Leonard Mbibi says:

    First, I thank you for your lessons, they’re one of the best.

    In preparation for the LFCS exam, knowing that some commands are deprecated and some files changed, for example:

    [[email protected] ~]# /etc/init.d/portmap start
    [[email protected] ~]# /etc/init.d/nfs start
    [[email protected] ~]# chkconfig --level 35 portmap on
    [[email protected] ~]# chkconfig --level 35 nfs on
    

    These are not available in latest Centos 7.

    Does one has a choice of the version of Linux machine to use in the exam? As I am new to Linux, I am only conversant with latest commands.

    Regards,
    Chiadi

  4. Jim Fecteau says:

    Excellent summary of the topic. Thank you!

  5. jagan says:

    clnt_create: RPC: Program not registered (how to solve)

  6. Gautam says:

    Thank you so much for sharing article and easy to understand and helpful.

  7. Zafar says:

    Hi Tarunika,

    Thanks for such a nice article on NFS server and client. It will help the readers to resolve NFS related issue.

    Best Regards
    Zafar

  8. Dinesh Kumar says:

    Hi ,

    Thank you for sharing this article, very helpful 

  9. sivakrishna says:

    Hi ,

    Thank you for sharing this article, very helpful ,

    when we are mounting with rw permissions in client side, can we restrict root/normal user to delete this nfs shared folders from client side.

    My Export config in server side

    /files   (rw,all_squash,anonuid=99,anongid=99)
    

    Mounting with below command

    mount -t nfs -o rw   ipaddresss:/files/frontend_shared /fe_shared/
    

    please advise.

    Thanks.

Leave a Reply to Jim Fecteau Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.