I'm mounting a NFS filesystem on my machine. How do I figure out what version of the NFS protocol the server uses? I don't have access to the NFS server machine, but I do have root on my client machine.

Is there anything I can run on my client machine to identify what version of the NFS protocol is being used by the server, or what versions it supports?

I wasn't able to find any useful information in /var/log/messages or kernel debugging output (dmesg).

I have tried running nfsstat, but I'm not sure if it is giving me any useful information. However, when I run nfsstat -s to request information about the server, I don't see anything useful:

# nfsstat -s
Server rpc stats:
calls      badcalls   badfmt     badauth    badclnt
0          0          0          0          0       

When I run nfsstat -c to request information about the client, I do see some information about Client nfs v3, but I'm not sure how to interpret this. Does this tell me anything about the protocol being used between my client machine and the NFS server? Does it mean I am currently using v3 of the NFS protocol? Does it tell me anything about what versions of the NFS protocol the server supports, e.g., NFS v4?


3 Answers 3


The nfsstat -c program will show you the NFS version actually being used.

If you run rpcinfo -p {server} you will see all the versions of all the RPC programs that the server supports. On my system I get this output:

$ rpcinfo -p localhost
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs

This shows me that my NFS server (localhost in this example) offers versions 2, 3, and 4 of the NFS protocol all over UDP and TCP.

  • 5
    How can you tell if V4 is 4.2 or something else (preferably without having the nfs actually running .. as I cannot mount from the client for some reason)?
    – Dylan
    Dec 17, 2015 at 17:08
  • 1
    @Dylan why not ask that as a new question? Dec 17, 2015 at 17:33
  • 4
    I do not understand why one should ask a new question to get more details on the same answer! Jul 10, 2020 at 6:27
  • 3
    @Madhusoodan because I don't know the answer to that part Apr 23, 2021 at 14:10
  • Ok :) I will ask new one! @roaima Jun 7, 2021 at 4:10

Depending your OS and version there may be different ways to check it.


# nfsstat -m
/mnt/share from
Flags:  rw,relatime,vers=3,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=,mountvers=3,mountport=30924,mountproto=udp,local_lock=none,addr=

But you can for sure

# grep nfs /proc/mounts /mnt/share nfs rw,relatime,vers=3,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=,mountvers=3,mountport=30924,mountproto=udp,local_lock=none,addr=

which is obviously the same output.

It shows vers=3 on server, and mountvers=3.

  • 4
    grep nfs /proc/mounts (for me on the server) only displays nfsd /proc/nfsd nfsd rw,realtime 0 0. I don't have the client actually mounted (I can't get it to work). Everything seems fine (using nfs4 on both, IP addresses are correct, /etc/exports is fine, nfs-server has been restarted, exportfs -rav looks fine, showmount -e server from client looks fine, etc. .. but when I try to mount EVERY TIME .. it hangs until mount.nfs: Connection timed out --or-- mount.nfs4: Connection timed out. So frustrating. Sorry for my rant that will probably go unfixed).
    – Dylan
    Dec 17, 2015 at 17:15
  • so, I guess .. is there a way to get the nfs version (like 4.2 or 4.1 or what have you) without having the client mounted?
    – Dylan
    Dec 17, 2015 at 17:17
  • I have been working hard on the same issue. All is fine and it used to work. I recreated my Vagrant VM's and then it stopped working. Nfsstat shows that all calls are badcalls of typ badauth.
    – onknows
    Jul 25, 2019 at 7:15
  • 3
    @Dylan, the server is configured to operate w/multiple versions of NFS. Depending on the server configuration and/or the client abilities/configs, there are multiple possible answers. Furthermore, if you don't have any clients connecting to the nfs server, you can check your server config files and/or /proc/fs/nfsd/versions to find out what versions the server is configured to support.
    – ILMostro_7
    Oct 18, 2019 at 14:36

One can open /etc/nfsmount.conf and get the information about default version and supported version.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .