Linux‎ > ‎Desktop Tips‎ > ‎

Using nfs instead of sshfs

posted Oct 25, 2014, 8:24 AM by Joe Bieber   [ updated Oct 25, 2014, 8:31 AM ]

So I decided to use nfs instead of sshfs to connect to my network shares and I'm glad I did. I have a FreeNAS file server and have both Windows and Linux boxes accessing it. I was connecting to my shares using sshfs as stated in previous post, but I never got around to having those shares automatically  mount on my Mint box and the process seemed cumbersome, so instead, I decided to setup some nfs shares on my NAS box and tried mounting them. Once I got the shares setup correctly on the NAS box, installing a nfs client was a snap.

$ sudo apt-get install nfs-common

You can check for available remote nfs shares on your server by using this command in the terminal:

$ showmount -e IP address of server 

Once I found the remote nfs share I wanted, I created a local directory to mount it to and added a line to my /etc/fstab like this:

$ IP address of server:/remote share /local mount directory nfs _netdev,auto 0 0

nfs - specifies filesystem type and _netdev prevents the system from attempting to mount the share until the network connection is up.

Done and done. Now when I turn on my system my remote shares auto-magically mount as soon as my network is available. No more clicking to mount, and because I am using nfs and have configured it this way, my authorization to access my shares is determined by my ip instead of username and password.

Depending on your file manager, you should add bookmarks to your newly mounted folder for ease of access.

Did I mention my file transfer speed increased as well.

(previously posted on my linux mint blog)