How To Install NANO Editor on FreeBSD

This is a quick tutorial on how to install Nano Editor on FreeBSD UNIX. If you got used to pico or nano editor and just installed FreeBSD, in my example FreeBSD 8.2 – RELEASE version, you will find out that if you try to run nano you will get an error that it’s not found.

Make sure you are logged in as root and follow these few steps to install nano and make it work.

portsnap fetch update
cd /usr/ports/editors/nano
make install clean
ln -s /usr/local/bin/nano /usr/bin/nano

If you are using a non-default installation such as the one on Amazon AWS, it might not have the /usr/ports folder, you can just run “portsnap fetch extract update” and try the above steps again or download the package (port) directly:

pkg_add -r nano
ln -s /usr/local/bin/nano /usr/bin/nano

This is it. You can now run nano and it will work the usual way.
If you have any questions, comments or suggestions please post below.