Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a laptop running Ubuntu 12.04 and a netbook running Ubuntu 12.10. I want to sync some folders from my laptop on my netbook, connecting them with an ethernet cable.

Both computers are offline, and I don't want to (eventually) share files through my office LAN.

What options do I have? Can I use Unison? What do I have to do in order to "connect" the two computers? (i.e. I have to manually set IPs on them, IPv4 settings, and so on).

share|improve this question

You do need to set IP addresses manually, both on netbook and notebook. The addresses must be on the same subnet.

As for the sync, you may use RSYNC over SSH to achieve this. The command is as follow:

$ rsync -avzgroupP -e ssh origin_folder login@dst_machine:destination_folder

Pay attention to the folder notation. If you add the / to the end of the directory, RSYNC will start to copy/put files from this point on but if you omit the /, then RSYNC will copy the folder itself and onward.

share|improve this answer

Here's how to set up the network connection.

  1. connect both computers using any ethernet cable.
  2. on each computer do the following:

    • select your network icon and choose the 'Edit...' option

    • choose 'Add...' in the 'Cable' tab

    • in the IPv4 tab, select 'Manual' for the method, and add the data

      ip-address:    (and for the other computer)

      leave the rest empty

    • uncheck the box 'automatically connect'

    • call your new connection something like "point-to-point connection (ip-address and choose 'Save'
  3. select this connection on both computers

  4. Use rsync as in fboaventura's answer

It may seem easier to just assign the ip-address and netmask using ifconfig. However, I found out that my network dropped all the time, and I think that was because of NetworkManager interfering. The method above lets NetworkManager be aware of the way you want it to be set up.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.