Linux / Unix: Show Shares on NFS Server [ Shared Directories ]

We have a few netapp and other Unix server running here. An NFS server is configured on both netapp and Unix. How do I see all exported file systems from netapp and unix server using Linux command line option?

You need to use the showmount command to see mount information for an NFS server. This command queries the mount daemon on a remote nfs host (netapp or unix nfs server) for information about the state of the NFS server on that machine. With no options passed the showmount command lists the set of clients who are mounting from that host. The output from showmount is designed to appear as though it were processed through sort -u command.

Display all exported file systems from an NFS server

Type the following command to list shared directories from an nfs server called nas03 (IP address

WARNING! You must run ‘showmount -e’ command as the root user. Switch to the root user by typing su – and entering the root password, when prompted.

# showmount -e
OR use server name such as nas03 or netapp03 or filer03:
# showmount -e nas03
Sample outputs:

Export list for nas03:

In this example /volume1/multimedia, /volume1/sales, and /volume1/users are shared on an NFS server. You can mount shared nfs directory called /volume1/multimedia from nas03 nfs server using the mount command, enter:
# mkdir /mnt/nfs
# mount -t nfs nas03:/volume1/multimedia /mnt/nfs

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 1 comment so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • jon Apr 26, 2012 @ 22:46

    If you are on an SVR4-compliant version of Unix such as Solaris or AIX then you also have the dfshares and dfmounts commands available.

    dfshares with no other parameters specified shows what you are exporting.

    dfshares with a hostname or IP address shows what that NFS server is exporting.

    dfmounts with no other parameters shows what NFS clients are mounting shares you are exporting.

    dfmounts with a hostname or IP shows what NFS clients are mounting shares from the remote NFS server.

    Don’t know whter Linux has gotten around to implementing these. I work almost exclusively on Solaris these days. When I previously worked on RedHat, they weren’t there then.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum