Ubuntu Linux NFS Client Configuration to mount nfs share

by n00b_Programmer · 11 comments

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.

Featured Articles:

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!

{ 11 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…

9 matt mcinvale 07.18.09 at 9:39 pm

might want to include some info on /etc/fstab here too.

10 cheeky 10.15.09 at 3:04 am

Oh thanxs very much u save my money and of course my time…

11 pgngp 10.23.09 at 8:58 pm

Thanks! This tutorial saved me so much time and effort!

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>

Previous post:

Next post: