showmount Command

Purpose

Displays a list of all clients that have remotely mounted file systems.

Syntax

/usr/bin/showmount [ -a ] [ -d ] [ -e ] [ Host ]

Description

The showmount command displays a list of all clients that have remotely mounted a file system from a specified machine in the Host parameter. This information is maintained by the mountd daemon on the Host parameter. This information is saved in the /etc/rmtab file in case the server crashes. The default value for the Host parameter is the value returned by the hostname command.

Note: If a client crashes, its entry will not be removed from the list until the client reboots and starts the umount -a command.
Note: The showmount command returns information maintained by the mountd daemon. Because NFS Version 4 does not use the mountd daemon, showmount will not return information about version 4 mounts.

Flags

Item Description
-a Prints all remote mounts in the format HostName:Directory, in which HostName is the name of the client and Directory is a directory pathname that has been remotely mounted.
-d Lists only directories that have been remotely mounted by clients.
-e Prints the list of exported directories.

Examples

  1. To display a list of all remote directories that are mounted by a host, enter the following command:

    /usr/bin/showmount  -a zeus

    In this example, the showmount command produces a list of all of the remote directories mounted by the clients on the host machine named zeus.
  2. To display a list of only the directories that are mounted by a client on the host, enter the following command:

    /usr/bin/showmount  -d athena

    In this example, the showmount command produces a list of all remote directories mounted by the client machines on the host named athena.
  3. To print a list of all directories that are exported from a machine, enter the following command:

    /usr/bin/showmount  -e zeus

    In this example, the showmount command produces a list of all remote directories that are exported by the host machine named zeus except the ones that are exported only with NFS version 4.

Files

Item Description
/etc/rmtab Contains information about the current state of all exported directories.
/etc/xtab Lists currently exported directories.