showmount Command Examples in Linux

showmount command shows information about an NFS server. This information is maintained by the mountd server on the host. The default value for the host is the value returned by the hostname. With no options, show the clients that have mounted directories from the host. showmount is usually found in /usr/sbin, which is not in the default search path.

showmount Command Options

The options available with the showmount command are as follows:

Option Description
-a, –all Print all remote mounts in the format hostname:directory, where hostname is the name of the client and directory is the root of the filesystem that has been mounted.
-d, –directories List directories that have been remotely mounted by clients.
-e, –exports Print the list of exported filesystems.
-h, –help Provide a short help summary.
–no-headers Do not print headers.
-v, –version Report the current version of the program.

showmount Command Examples

There are not several examples to demonstrate here. But below is a list of the most commonly used examples.

1. To get the list of available options and usage of the command:

# showmount -h
# showmount --help

2. To list the remote mounts in the format hostname:directory, where hostname is the name of the client and directory is the root of the filesystem that has been mounted:

# showmount -a
# showmount --all

3. If you only want to list the directories mounted by remote clients, use the -d option.

# showmount -d 192.168.10.10
# showmount --directories 192.168.10.10

4. To print the list of exported filesystems.

# showmount -e 192.168.10.10
# showmount --exports 192.168.10.10

5. To remove the header from the showmount command output, use the -h option:

# showmount --no-headers

6. To view the version of the showmount command/package being used:

# showmount -v
# showmount --version
Related Post