nfsconf(8) — Linux manual page


nfsconf(8)               System Manager's Manual              nfsconf(8)

NAME         top

       nfsconf - Query various NFS configuration settings

SYNOPSIS         top

       nfsconf --dump [-v|--verbose] [-f|--file infile.conf] [outfile]

       nfsconf --entry [--arg subsection] section tag

       nfsconf --get [-v|--verbose] [-f|--file infile.conf] [-a|--arg
       subsection] section tag

       nfsconf --isset [-v|--verbose] [-f|--file infile.conf] [-a|--arg
       subsection] section tag

       nfsconf --set [-v|--verbose] [-m|--modified Modified by text]
       [-f|--file infile.conf] [-a|--arg subsection] section tag value

       nfsconf --unset [-v|--verbose] [-f|--file infile.conf] [-a|--arg
       subsection] section tag

DESCRIPTION         top

       The nfsconf command can be used to test for and retrieve
       configuration settings from a range of nfs-utils configuration

       The following modes are available:

       -d, --dump
              Output an alphabetically sorted dump of the current
              configuration in conf file format. Accepts an optional
              filename in which to write the output.

       -e, --entry
              retrieve the config entry rather than its current expanded

       -i, --isset
              Test if a specific tag has a value set.

       -g, --get
              Output the current value of the specified tag.

       -s, --set
              Update or Add a tag and value to the config file in a
              specified section, creating the tag, section, and file if
              necessary. If the section is defined as '#' then a comment
              is appended to the file. If a comment is set with a tag
              name then any exiting tagged comment with a matching name
              is replaced.

       -u, --unset
              Remove the specified tag and its value from the config

OPTIONS         top

   Options valid in all modes
       -v, --verbose
              Increase verbosity and print debugging information.

       -f, --file infile
              Select a different config file to operate upon, default is

   Options only valid in --entry and --get and --isset modes.
       -a, --arg subsection
              Select a specific sub-section

   Options only valid in --set mode.
       -m, --modified "Modified by nfsconf" Set the text on the Modified
       date comment in the file. Set to empty to remove.

EXIT STATUS         top

   --isset mode
       In this mode the command will return success (0) if the selected
       tag has a value, any other exit code indicates the value is not
       set, or some other error has occurred.

   all other modes
       Success is indicated by an exit status of zero, any other status
       indicates an error. Error messages are output on stderr, and
       increasing verbosity will give more detailed explanations if any
       are available.

EXAMPLES         top

       nfsconf -v --dump --file /tmp/testconf.conf sorted.conf
              Check a new config file for syntax errors and output a
              sorted version for ease of comparison with existing

       if ! nfsconf --isset gssd preferred-realm ; then echo 'No
       preferred realm configured for gss'; fi
              The tool allows for easy testing of configuration values
              from shell scripts, here we test if a specific value has
              been set.

       nfsconf --file /etc/nfsmount.conf --get --arg /home MountPoint
              Show default value for background option for NFS mounts of
              the /home path.

       nfsconf --file /etc/nfs.conf --set nfsd debug 1
              Enable debugging in nfsd

FILES         top


SEE ALSO         top

       nfsd(8), exportfs(8), idmapd(8), statd(8)

AUTHOR         top

       Justin Mitchell <>

COLOPHON         top

       This page is part of the nfs-utils (NFS utilities) project.
       Information about the project can be found at 
       ⟨⟩.  If you have a
       bug report for this manual page, see
       ⟨⟩.  This page was
       obtained from the project's upstream Git repository
       ⟨git://⟩ on
       2023-12-22.  (At that time, the date of the most recent commit
       that was found in the repository was 2023-12-05.)  If you
       discover any rendering problems in this HTML version of the page,
       or you believe there is a better or more up-to-date source for
       the page, or you have corrections or improvements to the
       information in this COLOPHON (which is not part of the original
       manual page), send a mail to

                               2 May 2018                     nfsconf(8)