Mounting NFS in Ubuntu

August 05, 2011

At home we have a NAS that supports NFS!

Its quite easy to setup Ubuntu (11.04) as an NFS client - this will allow you to mount the NAS on your local filesystem and it will appear just like any other directory.

First step is to install the nfs-common package:
sudo apt-get install nfs-common

You can now mount NFS volumes!
To do so temporarily, can use this command:

The mount point needs to exist prior to mounting.
For example, my nas would be mounted as follows:
sudo mkdir /mnt/nas
sudo mount.nfs /mnt/nas

To make this permanent, you would need to add the following line to /etc/fstab:  /mnt/NAS  nfs  defaults  0  0

As a bonus, this also allows you to use the mount and umount commands by just specifying the mount point as these commands will query the /etc/fstab file.

For example, once your /etc/fstab file is up to date, these commands will work without specifying the remote host and path:
sudo umount /mnt/nas
sudo mount /mnt/nas

Search and replace, vim and git

Search and replace, vim and git Continue reading

Using netrw instead of NERDTree for Vim

Published on December 28, 2016