The /etc/exports file controls what directories the NFS server exports. Its format is as follows:

# directory hostname(options)
/misc/export     speedy.example.com(rw,sync)
/misc/export     192.168.1.20(rw,sync)
/misc/export     192.168.1.21(sync)

Mount remote directory

root@srv1# mount shadowman.example.com:/misc/export /misc/local

/etc/fstab

server:/usr/local/pub    /pub   nfs    rsize=8192,wsize=8192,timeo=14,intr

Caution 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 speedy.example.com(rw,sync)
/misc/export speedy.example.com (rw,sync)

The first line grants users from speedy.example.com read-write access and denies all other users. The second line grants users from speedy.example.com read-only access (the default) and allows the rest of the world read-write access

Freebsd

nfs_client_enabled="YES"

/etc/rc.d/nfsclient start