Ubuntu Linux NFS Client Configuration to mount nfs share

Since I am not networking professional I was nervous about using nfs share. Desperately I wanted to access my files over network using Ubuntu NFS. Our IT folks not working today due to weekend holiday.

Ubuntu NFS

After searching net, I discover that you need two packages to mount nfs share under Ubuntu Linux.

So, I did Install necessary support for nfs client side i.e. portmap and nfs-common package. Type following command to install packages:
sudo apt-get install portmap nfs-common

Now mount server.mydomain.com:/network/officedocs to /home/me/myfiles
cd
mkdir myfiles
sudo mount server.mydomain.com:/network/officesdocs /home/me/myfiles

Note you may need to restart above services:
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart

How do I access my files using NFS?

Just go to mount point i.e. myfiles with cd command:
cd myfiles
ls
gedit file.c

May be next time I will get my hands dirty with NFS server ;)

Recourses

Following recourses helped me to configure NFS :)

This is a user contributed article.

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 8 comments… read them below or add one }

1 Someone Else 06.27.06 at 2:32 am

Thanks. You made it really simple for me. I am new to Ubuntu and hoping to get away from Microsoft, so long as help is around. Thanks!

2 Ryan 08.19.06 at 4:56 pm

I get permission denied when changing to the nounted directory, yet it works fine as root?

3 nixcraft 08.19.06 at 6:10 pm

This is a permission problem. Setup a correct permission using chmod command on exported directory. Or map user id using map_static option.

4 Jeffala 11.04.06 at 9:29 pm

Thanks for sharing. SuSE has a gui wizard to handle NFS client and server config. I thought I was going to have give up some features.

Thanks again.

5 shanmugam 10.11.07 at 11:33 am

hi
I need of the linux advance server and trubleshooting book in pdf format ver urgent.please send me in my mail id is shanmugam.jayapal@gmail.com

6 Selva 05.13.09 at 7:16 am

thx, dude, u saved my day.

- :)

7 Junior 06.03.09 at 8:09 am

Hi,

Installing nfs-common didn’t work for me. Instead i installed the
sudo apt-get install portmap nfs-kernel-server

That did it for me!!
Grtz

8 Tobbs 06.18.09 at 11:53 am

Too complicated. All problems with different ports, processes, firewall, SELinux, etc is just too much. Compared to SSH, I cant help wondering why NFS isn’t more easy to install and use. Think fileserver functionality should have been easier that opening programs remote!? Sorry folks…

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tagged as: , , , , , , , , ,

Previous post: Rebuilding corrupted RPM database

Next post: Mark Shuttleworth on Ubuntu Long Term Support