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

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

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

122 Responses


    mount -v -t nfs /root/temp
    mount.nfs: timeout set for Mon Jan 8 23:05:38 2018
    mount.nfs: trying text-based options ‘vers=4.2,addr=,clientaddr=’
    mount.nfs: mount(2): Protocol not supported
    mount.nfs: trying text-based options ‘vers=4.1,addr=,clientaddr=’
    mount.nfs: mount(2): Input/output error
    mount.nfs: mount system call failed

    journalctl | tail -1
    Jan 08 23:06:30 kali kernel: NFS: nfs4_discover_server_trunking unhandled error -22. Exiting with error EIO

  2. Shraddha says:

    Useful information.. thank you very much

  3. parvesh says:

    Hi its very fine with your site, but, you missed one command after,

    # /etc/exports
    # exportfs -avr
  4. Mini says:

    On CentOS 6.x i got error “unable to register (RQUOTAPROG, RQUOTAVERS, udp)”, “Connection refused”.

    I had to start & enable rpcbind service:
    service rpcbind start;chkconfig rpcbind on

  5. Bridgette says:

    I am trying to execute this on Centos 7 and can’t find nfs-utils-lib using yum. Any advice?

  6. Rupesh says:

    Really a very help instructive article.

    I have mounted a directory of one system on another.

    Now I am not able to create file/folder from that client system into this mount point.

    How can I create file or folder from that client system into the mount point i.e. into the shared directory of the server?

    • Ravi Saive says:


      Please check that you’ve given rw permission on the NFS server mount point..

      • Rupesh says:

        Thanks Ravi for the quick suggestion.

        rw permission was already given.
        However the root_squash applied on the server shared directory was denying the permission to create files in it from the client machine.
        Using no_root_squash solved the issue.

  7. Gayathri says:

    when I use showmount command there is a port map failure in client side. How to rectify this. Please share the answers

  8. Mushtaque says:

    This article shows to share with 1 nfs client, in case I have 1000+ clients to share the same directory ? Please help

    • Ravi Saive says:


      Same procedure, manually mount the nfs share on client machines, or if you have good scripting skills you can automate it..

  9. vasu says:

    But Really so usefull and clearly explained by you people ,thanks for this posting and tecmint

  10. vasu says:

    Hi Ravi,

    Will please add firewall rules to respect to nfs in this will be more usefull

Got something to say? Join the discussion.

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.