Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to synchronize two folders between two Ubuntu computers but all my web searches come up with ideas to synchronize over the web, but I do not want to do this. The two computers are physically next to each other, so what I want to do is connect them together with a cable and then synchronize. How do I do this, and what sort of cable would I need?

share|improve this question
    
This sounds an awful lot like the "Briefcase" feature that came in Windows 95. I think Microsoft discontinued it because no one really used it. –  Scott Ritchie Nov 26 '10 at 19:31

2 Answers 2

up vote 6 down vote accepted

If you connect the two with a cross-over RJ-45 cable (give them IP addresses in the same range, like 192.168.0.10/255.255.255.0 and 192.168.0.11/255.255.255.0), then use a tool like Unison (in the respositories), you should be able to synchronise what you like.

sudo apt-get install unison-gtk

This method needs that "special" cross-over cable, but removes the need for a hub or switch and certainly, there's no need for a router or internet access.

share|improve this answer
    
I have an unused router, but not a RJ-45 cable. Can I just connect the two computers together through this router? –  babelproofreader Nov 26 '10 at 15:02
    
@babelproofreader yes, you can connect through an ethernet switch (that's what most "home internet routers" are), no change to the instructions Scaine has given. Also, most modern ethernet cards have auto-sensing features so you don't need a cross-over cable any more: a normal cable will do. –  Riccardo Murri Nov 26 '10 at 16:22
    
Yep, as Riccardo notes, you might (if they're modern PCs) get away with a normal cable. If you use the router, make sure you use the "switch ports" on the router, not the "WAN port". Then manually assign the IP addresses, and try a ping. If they can ping each other, then Unison (or Rsync, or Tar, or cp whatever tool you use) should work fine. –  Scaine Nov 26 '10 at 17:06
    
Got myself a RJ-45 cable and installed Unison and everything works like a charm. Many thanks. –  babelproofreader Dec 1 '10 at 1:43

The network-manager lets you connect computers together directly. If you right-click on its icon and select 'edit connections', you can select 'auto eth0' under the tab and click on the 'edit' button. The 'IPv4 Settings' tab in the window has a box labelled 'method', from it you can select 'shared to other computers.' If you do this to one computer and connect the other to it (no crossover cable needed), it will act like a router and you should be able to transfer files by whatever method that way. It will also share its wireless internet connection (if it has one) to the other computer. I don't know if you have to change it back to connect normally.

This is what I use to connect my laptop to the old desktop I use to hold my backups, your mileage might vary though. I usually use avahi and an ftp server to connect, but this requires files to be transferred manually, Unison should suit your purposes better.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.