ubuntu I do love using Ubuntu and have done so since 6.04. It has clearly become better and easier to set up and play with over the years. Though the only thing I still fight with is the Nvidia graphic card and being able to share my files over the network. The Nvidia issue is not an issue on my set up any more, since 9.10 found my external monitor and didn’t complain as it used to, so I would call that solved 🙂

Though the network share is still an issue, for the life of me I can’t get my two machines to see each other. I got a PC with my music, backup and other files which I would like to access from my laptop.

Both machines are set up just as Ubuntu come off the install CD. And now and again I would like the network to be seen from a laptop running XP. What I found out that there are a few ways of doing network share on the Ubuntu.

Samba : by the look and sound of it should be the easiest to set up and run. But I never got it to share the way I wanted. Either one pc saw the other but the other didn’t like to share its files with anyone. Some times I managed to get the XP laptop to see the folders but never had read write access to the files.

CIFS : had one look and one go at it, but it was way over my head. I had to do too much typing in the terminal etc.

NFS : A simple few edits to Ubuntu and I was up and running right away sharing my files just as I wanted.

I had lost my saved shortcut and after some minutes search I found web site again where the tutorial is. And since the website haven’t been updated for a while I’m posting it here, since I rather not loose it again. I hope that the original poster don’t mind.

In this small Tutorial I will show you how to set up a working directory / file share between two or more Ubuntu Linux Computers.

We’re gonna share the directory /media/music on the Ubuntu Linux box ernie, in order to allow the other Linux box bert to access it and listen to ernie’s music, Let’s go! :)

1 – Setting up ernie (who is sharing the directory):

Just Execute the following commands in a Terminal on ernie ;)

  • At first, we need to Install the Packages which are needed in order to share the files via NFS:
    sudo apt-get install nfs-kernel-server
  • Now, edit /etc/exports in order to share our music folder!
    sudo nano /etc/exports and add the line

    /media/music bert(ro,async,all_squash)

    ro means “read only”, so the others can not delete your files. If you wish to allow writing to this directory, use rw “read write” instead!

  • Restart the NFS Server by executing
    sudo /etc/init.d/nfs-kernel-server restart
  • We’ve configured ernie very fast, didn’t we? Now it’s bert’s turn ;)

2 – Setting up bert (who is using the directory):

Execute the following commands in a Terminal on bert ;)

  • Install the needed “NFS Common” Package nfs-common
    sudo apt-get install nfs-common
  • Create your a music directory which will contain ernie’s directory and which is located at /var/music:
    mkdir /var/music
  • Mount ernie’s shared music directory to /var/music:
    sudo mount ernie:/media/music /var/music
  • Now you can access the files from ernie in your local direcotry /var/music – Have Fun! :)
  • If you wish to mount the Directory automatically each startup, just just need to modify /etc/fstab:

    Open the file using sudo nano /etc/fstab and append

    ernie:/media/music  /var/music     nfs r,hard   0  0

    (Use rw,hard instead of r,hard in case you shared the File as “read write” or you won’t be able to change files!)

3 – We’re finished

Setting up basic File Sharing between Linux computers isn’t as hard as everybody is saying, and I really hope this will help some Linux Beginners out there to manage it on their own.

It’s just a couple of commands, if you experience any trouble or problems with this, please feel free to comment and I will try my best to help you :)

LINK : How to set up NFS and How to Share Files in a local network with Ubuntu Linux?