Ubuntu – How to share files on the home network


I would like to set up a home network with the various Ubuntu machines I have at my home. They are all running 10.04. It would have to be able to share files and maybe even chat. 🙂

Any information on how to set this up would be beneficial.

Please and thank you.

Best Answer

Networking in general with Linux is a wide field. It is one of those parts where the operating system is strong and offers lots possibilities. I would suggest different steps:

Getting an IP address


At first every computer in your network needs an IP address. Most home networks have some kind of (DSL) router which offers DHCP. That means you'll get automatically an IP from your router and don't have to worry about.


Avahi is another easy form to connect your computers in your home network. You need avahi-daemon installed. Furthermore the package libnss-mdns is needed. If the avahi daemon runs, you can connect to other computers in your network with computername.local. They will assign an IP and use their hostname for connections (If you forget the hostnames, open a terminal and type hostname.).

Fixed IP address

If the above is not the case the next easy solution (in my opinion) is to give every computer a fixed IP address. For me the easiest way is to edit etc/network/interfaces:

auto eth0
iface eth0 inet static

Those lines assign the IP to the network interface eth0 on that computer. Other information like netmask, default router etc. can also be entered into that file.


Another possibility is to install an DHCP server. This is usually more complex. I will not cover this here.

Getting a name

Under normal circumstances only connecting via IP addresses is not nice. You have to remember all those numbers. So it gets easier with names. If you only have a few computers in your network, you can edit /etc/hosts like:  localhost server laptop images router

The first entry is the IP address and the second is the name you want to use. Now you can use images to connect to the computer with IP This file has to be on every computer in your network.

If you don't want to distribute that file across your computers, you can use a DNS server like BIND. But setting this up is too complex for my answer. ;)

Now every computer has an IP address and a name. You can connect to them.

Share files

Nautilus allows you to share files. Just click right on a folder and choose it too be shared. Eventually Ubuntu will install some missing files. Choose a name and access rights for that share and you're done. If you use the service-discovery-applet or ahavi-discover it is easy to access the files.

A special application is giver. Every computer needs to run this software. With drag&drop you can share files between computers. Besides this you can also use Pidgin, an FTP server or Samba to access files.


Here we need Avahi again. Install python-avahi and choose Pidgin as chat software (also Gajim is able to chat via Bonjour). Make a new account and choose Bonjour as communication protocol. If you start Pidgin and other Bonjour-users are active in your network, you'll see them and can chat.

As said before there are several other possibilities to chat. I chose only this. Furthermore you can configure those services in specific ways. If you have questions it would be the best to ask them in more detail. Have fun with your network. :-)

Related Question