A very useful script for allowing remote code edition on a RaspberryPi.

… or really any Debian-based machine :)

Make sure you’ve installed the packages in the top comment, and added the mentionned line to your /etc/exports file.

Place the script in your home folder (/home/pi by default) and rename it to nfs-start.sh. Allow execution with chmod +x nfs-start.sh.

Each time you want to remotely edit files on your RaspberryPi, launch the script with ssh pi@[hostname-or-ip] ./nfs-start.sh.

Then, on OSX / macOs, open the Finder and hit ⌘ + K. Add your server like so : nfs://[hostname-or-ip]/home and you’re done! Next time, the server will already be listed and you won’t have to type it again.