NFS

NFS (Network File System) is a nice and easy way to share files between your systems (non-windows). However if you try to cd into a folder that should have an NFS filesystem mounted, but doesn't, you might be in for some trouble. With that fair warning, we'll continue. Setting it up only requires adding only a few lines to /etc/rc.conf

nfs_server_enable="YES"
rpcbind_enable="YES"
mountd_flags="-r"
nfs_client_enable="YES"

The first three are for the server, and the fourth for the client. The server will automatically startup at boot time now, but you can invoke it manually with these commands:

rpcbind
nfsd -u -t -n 4
mountd -r

In order to define what is shared, we turn to /etc/exports. There are many ways you can define how you will share your stuff, but I'm just going to do one.

/usr/ports/packages -network 192.168.1.101 -mask 255.255.255.0

That IP address is my upstairs computer, and at the time of writing I was messing around with a package repository. One other very important thing is mounting the shared directory on the computer up there.

mount 192.168.1.100:/usr/ports/packages /mnt

I was just testing it at the time, and it did indeed work. That IP is the address of my downstairs computer of course.