May 20, 2024

nfs howto

Nfs allows you to remotely mount a directory so it acts like it’s local, and also make it mount the same place every time you boot up. It’s really handy, pretty simple and quite proven in the field.

nfs howto

first set up the server

apt-get install nfs-kernel-server portmap
vi /etc/exports
  add blank line after last one
chown nobody:nogroup /folder/you/want/your/remote/box/to/see
echo "portmap: 192.168.2." >> /etc/hosts.allow
/etc/init.d/nfs-kernel-server restart
exportfs -ra

if everything worked, you should see an entry like


now mount the folder on your client like:

apt-get install nfs-common 
mount -t nfs /place/where/you/want/it/mounted/locally

if things went well, you should see an entry like: on /place/where/you/mounted/it/locally type nfs (rw,addr=

if you want to make it mount automatically every time you boot the client, add a line to /etc/fstab like:

vi /etc/fstab /place/where/you/want/it/locally   nfs     _netdev,auto  0  0
mount /place/where/you/want/it/locally
  you should see something that starts with on /local/blah type nfs4 (rw,...

the _netdev waits until your network comes up before mounting it, the “auto” waits until your system boots up before mounting.