NFS.CONF(5)
๐ NFS.CONF(5) ๐
okay bestie, sit down, hydrate, because we're about to talk about nfs.conf โ the general configuration for NFS daemons and tools, straight out of the File Formats Manual. this is the one that makes all your NFS stuff behave. it's giving central nervous system. it's giving group chat admin. let's go ๐ฆ
โจ SYNOPSIS โจ
/usr/etc/nfs.conf /usr/etc/nfs.conf.d/ /etc/nfs.conf /etc/nfs.conf.d/
๐ธ DESCRIPTION ๐ธ
so these files? they hold your site-specific configuration for a whole bunch of NFS daemons and other processes. and yes, most config can also be passed to processes via command line arguments, but honestly? having one central file is just easier. it's the "one shared doc instead of 47 scattered DMs" of the Unix world. especially because it encourages consistent configuration across different processes. slay.
now the rules of the road:
- when command line options are provided, they override values set in this file. no cap.
- when this file doesn't specify a particular parameter, and no command line option is provided, each tool just does its own thing and provides its own default values. iconic behavior honestly.
the file format supports multiple sections, and each section can hold multiple value assignments. here's the tea:
a section is introduced by a line containing the section name enclosed in square brackets, so
[global]
would introduce a section called global. a value assignment is a single line that has the name of the value, an equals sign, and a setting for the value, so
threads = 4
would set the value named threads in the current section to 4. leading and trailing spaces and tab are ignored, as are spaces and tabs surrounding the equals sign. single and double quotes surrounding the assigned value are also removed. and if the resulting string is empty? the whole assignment is just ignored. bye ๐
any line starting with # or ; is ignored, as is any blank line. we love a low-effort comment.
if the assigned value started with a $ then the remainder is treated as a name and looked for in the section [environment] or in the processes environment (see environ(7)). the value found is used for this value. cute little variable expansion moment โจ
the value name include is special. if a section contains
include = /some/file/name
then the named file will be read, and any value assignments found therein will be added to the current section. and if the file contains section headers, then new sections will be created just as if the included file appeared in place of the include line. if the file name starts with a hyphen then that is stripped off before the file is opened, and if file doesn't exist no warning is given. normally, a non-existent include file generates a warning. so like... the hyphen is the "don't @ me" flag. noted ๐ซถ
lookup of section and value names is case-insensitive. we're chill like that.
booleans, because everyone asks: where a Boolean value is expected, any of true, t, yes, y, on, or 1 can be used for "true", while false, f, no, n, off, or 0 can be used for "false". comparisons are case-insensitive. so many ways to say yes. very me.
๐ SECTIONS ๐
the following sections are known to various programs, and can contain the given named values. most sections can also contain a debug value, which can be one or more from the list general, call, auth, parse, all. when a list is given, the members should be comma-separated. the values 0 and 1 are also accepted, with '0' making no changes to the debug level, and '1' equivalent to specifying 'all'. yes bestie, 1 = everything, 0 = touch nothing. we love a shortcut.
generalโ recognized values:pipefs-directory. seeblkmapd(8),rpc.idmapd(8), andrpc.gssd(8)for details. ๐งexportsโ recognized values:rootdir. settingrootdirto a valid path causes the nfs server to act as if the supplied path is being prefixed to all the exported entries. for instance, ifrootdir=/my/root, and there is an entry in/etc/exportsfor/filesystem, then the client will be able to mount the path as/filesystem, but on the server, this will resolve to the path/my/root/filesystem. it's the โจillusionโจ of the path you wanted.exportdโ recognized values:manage-gids,threads,cache-use-ipaddr,ttl,state-directory-path. seeexportd(8)for details. note that setting"debug = auth"for exportd is equivalent to providing the--log-authoption.nfsdโ recognized values:threads,min-threads,host,scope,port,grace-time,lease-time,udp,tcp,vers3,vers4,vers4.0,vers4.1,vers4.2,rdma,fh-key-file,. version and protocol values are Boolean values as described above, and are also used byrpc.mountd.threads,min-threadsand the two times are integers.portandrdmaare service names or numbers. seerpc.nfsd(8)for details. ๐ฅmountdโ recognized values:manage-gids,descriptors,port,threads,reverse-lookup,cache-use-ipaddr,ttl,state-directory-path,ha-callout. these, together with the protocol and version values in the[nfsd]section, are used to configure mountd. seerpc.mountd(8)for details. note that setting"debug = auth"for mountd is equivalent to providing the--log-authoption. also!! thestate-directory-pathvalue in the[mountd]section is also used byexportfs(8). shared custody, we love to see it.statdโ recognized values:port,outgoing-port,name,state-directory-path,ha-callout. seerpc.statd(8)for details.lockdโ recognized values:portandudp-port. seerpc.statd(8)for details. (yes, that's the same manpage as statd. not a typo, it's just how it is ๐)sm-notifyโ recognized values:retry-time,outgoing-port, andoutgoing-addr. seesm-notify(8)for details.gssdโ recognized values:verbosity,rpc-verbosity,use-memcache,use-machine-creds,use-gss-proxy,avoid-dns,allowed-enctypes,context-timeout,rpc-timeout,keytab-file,cred-cache-directory,preferred-realm,set-home. seerpc.gssd(8)for details. that's a lot of values and honestly? she ate.svcgssdโ recognized values:principal. seerpc.svcgssd(8)for details.exportfsโ onlydebug=is recognized. one single value. minimalism. main character energy.nfsraheadโ recognized values:nfs,nfsv4,default. seenfsrahead(5)for details. ๐
๐ FILES ๐
/usr/etc/nfs.conf
/usr/etc/nfs.conf.d/*.conf
/etc/nfs.conf
/etc/nfs.conf.d/*.conf
various configuration files read in order. later settings override earlier settings. so the last one to speak wins. periodt. ๐
๐ฆ SEE ALSO ๐ฆ
rpc.nfsd(8), rpc.mountd(8), nfsmount.conf(5).
and that's the whole page bestie, you now know nfs.conf better than people who read it for a living. go forth and configure responsibly ๐
kisses, from the NFS.CONF(5) page in the File Formats Manual โ see you at the bottom of the manpage, where the footer lives ๐
๐ฆ where this page comes from
- arch rolling: nfs-utils 3.1.1-1 ยท GPL-2.0-or-later
- nixos 26.05: nfs-utils 2.9.1
- nixpkgs unstable: nfs-utils 3.1.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms