Saturday, 23 April 2011

Configuring NFS

File sharing between to linux boxes with NFS

start nfs service on the server machine and client machine
Server :

service nfs start

edit /etc/exports file and add the location you want to share

this is the entry to be added to exports file to share a folder called test in home directory. (rw) will allow both read and write

folder_name_with_path host_name(options)
host_name is the name of the host(client IP or client hostname) from where you are going to mount this share

ex: if you want to share a folder called test in home folder to a client with ip address do as below..

edit export file to add this entry (this is entered host server whose folder is actually shared)

on Server(


go to cleint machine and start nfs service

then mount the nfs sharing

mount -t nfs -o rw nfs_server_name://folder_name_with_path mount_point

on Client(
mount -t nfs -o rw /testnfs

see man page of mount to see all the mount options.

now you can see the sharing as a folder in your own filesystem with read write permission