21.6.2. Command Line Configuration

download PDF
If you prefer editing configuration files using a text editor or if you do not have the X Window System installed, you can modify the configuration file directly.
The /etc/exports file controls what directories the NFS server exports. Its format is as follows:
directory hostname(options)
The only option that needs to be specified is one of sync or async (sync is recommended). If sync is specified, the server does not reply to requests before the changes made by the request are written to the disk.
For example,
would allow users from to mount /misc/export with the default read-only permissions, but,
would allow users from to mount /misc/export with read/write privileges.
Refer to Section 21.6.4, “Hostname Formats” for an explanation of possible hostname formats.


Be careful with spaces in the /etc/exports file. If there are no spaces between the hostname and the options in parentheses, the options apply only to the hostname. If there is a space between the hostname and the options, the options apply to the rest of the world. For example, examine the following lines:
/misc/export,sync) /misc/export (rw,sync)
The first line grants users from read-write access and denies all other users. The second line grants users from read-only access (the default) and allows the rest of the world read-write access.
Each time you change /etc/exports, you must inform the NFS daemon of the change, or reload the configuration file with the following command:
service nfs reload
Red Hat logoGithubRedditYoutubeTwitter


Try, buy, & sell


About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.