To show the shares (or exported directories) on an NFS server in Linux or Unix, you can use the showmount
command. The showmount
command is used to display the information about an NFS server’s exported directories.
For example, to show the shares on an NFS server with the hostname nfsserver
, you would run the following command:
showmount -e nfsserver
This will show a list of the directories exported by the NFS server, along with the client systems that are allowed to access each share.
Here is an example of the output of the showmount
command:
Export list for nfsserver:
/data 192.168.0.0/24
/home 192.168.1.0/24
This example shows that the NFS server nfsserver
has two shares: /data
and /home
. The IP address range 192.168.0.0/24
is allowed to access the /data
share, while the IP address range 192.168.1.0/24
is allowed to access the /home
share.