NFS Clients

OpenBSD’s NFS client doesn’t need any daemons or configuration. Just mount the remote filesystem. Here, I mount my home directory from my server treble on /mnt:

# mount treble:/home/mwlucas /mnt

When mounting remote filesystems over NFS, enter the hostname or IP address, a colon, and the directory. Because I have the same UID on both the client and server, I can access, alter, remove, and add files in /mnt exactly as if I were dealing with files on a local filesystem.

Verify your mount with df(1) or mount(8).

$ df -h
Filesystem             Size    Used   Avail Capacity  Mounted on
/dev/sd0a             1005M    266M    689M    28%    /
…
treble:/home/mwlucas  26.9G   21.5M   25.5G     0%    /mnt

The NFS-mounted directory shows up like any other mount point.

To mount an NFS share automatically ...

Get Absolute OpenBSD, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.