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

last updated in Categories

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


Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

1 comment

  1. 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.

    Still, have a question? Get help on our forum!