showmount – Display information about NFS server mounts

The showmount command is a Linux utility that displays information about NFS (Network File System) mounted file systems on the specified host. It is used to verify the status of NFS shares on a server. The command displays the list of clients that are currently connected to the NFS server, the shared directories and files, and the access permissions of each client.

Overview

The syntax for the showmount command is as follows:

showmount [options] [hostname]

Where options are the various command-line options available for the showmount command and hostname is the name of the NFS server whose mount information is to be displayed.

To display the list of NFS shares on the local server, use the following command:

showmount -e

This will display a list of all the NFS shares that are currently exported by the local server.

To display the list of clients that are currently connected to the NFS server, use the following command:

showmount -a

This will display a list of all the clients that are currently mounted on the NFS server.

To display the list of NFS shares that are mounted on a specific client, use the following command:

showmount -e <hostname>

This will display a list of all the NFS shares that are currently mounted on the specified client.

Options

The following table lists the available options for the showmount command:

Option Description
-a Displays all clients that are currently mounted on the NFS server.
-d Enables debugging output.
-e Displays all the NFS shares that are currently exported by the server.
-E Displays only the NFS shares that are exported by the server.
-h Displays the help message for the showmount command.
-n Displays the output in numeric format instead of using hostnames.
-v Enables verbose output.

Troubleshooting tips

Here are some troubleshooting tips for common issues with the showmount command:

  • If the showmount command returns an error message indicating that the NFS server is not responding, check that the NFS server is running and that the NFS service is enabled.
  • If the showmount command returns an error message indicating that the RPC (Remote Procedure Call) service is not running, check that the rpcbind service is running.
  • If the showmount command does not display any NFS shares or clients, check that the NFS shares are properly configured and that the clients are properly mounted.

Notes

  • The showmount command requires root privileges to run.
  • The showmount command is available on most Linux distributions, including CentOS, Ubuntu, and Debian.
  • The showmount command can be used in conjunction with other Linux commands, such as grep and awk, to filter and manipulate the output.