22

I have an ethernet cable (not a crossover cable) to connect my laptop and my desktop ubuntu machines. I want to transfer large amounts of data. Is it possible with such a cable? I believe that between two Windows machines such a connection is possible (though I'm not totally sure).

13

Of course you can! Connect them with the cable, set IP addresses for each machine, for example 192.168.1.1 for your desktop and 192.168.1.2 for your notebook. Don't forget to disable/enable the connection after you set the addresses, as it may be necessary for them to become active.

Then, on one of your machines, possibly the source of the data, right click the folder you want to share, go to "Share" and enable sharing. Samba is required for this and you will be asked whether you want to install it when enabling sharing, otherwise, if it's already installed, it will just work right away. Remember to set an easy sharing name, something short and without spaces.

Now, go to the other machine, open nautilus (or any other file manager thereof) and go to location:

smb://192.168.1.2/folder/

Where:

192.168.1.2 is the IP of the source machine where the folder is being shared.
folder is the folder name you set when enabling the sharing.

In nautilus, you can go to this location by clicking CTRL + L and writing it to the address bar.

  • Thanks a lot! That worked. Once I saw that making one machine a gateway (i.e. the 192.168.1.1) the machine are able to see each other on the network, I could use ssh to do my transfer. – donatello Sep 4 '11 at 6:18
  • For "set IP addresses for each machine", note that this is done by editing the connection on each machine. You should be careful that your IP addresses don't conflict with e.g. the ranges defined by your wireless router (which 192.168.* can do) - use ifconfig at the command line to find out what's in use. An alternative to hardwiring IPs is to edit the connection on the "master" machine and just change the connection method: they'll both then negotiate IP addresses. See this response for more details askubuntu.com/questions/105262/… – J-P Jan 12 '14 at 11:42
  • "Set IP addresses for each machine" is pretty darn vague. – detly Jan 15 '15 at 9:59
9

A direct connection between any two computers is perfectly possible with a cross cable hooked up to both of them and can be bought at any store that sells network cables. If one of the two computers is more modern, you don't even need such a cross cable and any network cable will do.

Hardware config:

Have a look at this AskUbuntu Q&A how to set up a static IP address and set one computer to use 192.168.1.1/24 and the other to 192.168.1.2/24

Plug this cable into the Ethernet ports of both computers.

Software:

The easiest way to transfer files between computers is NitroShare as it doesn't need any infrastructure and is easy to install&use and is blindingly fast. It also runs on everything: Ubuntu, Windows, ...

To install NitroShare, use the following steps:

sudo add-apt-repository ppa:george-edison55/nitroshare-dev
sudo apt-get update
sudo apt-get install nitroshare

A small icon now shows up in the menu bar:

Nitroshare Menu bar Icon

(do these steps on both computers)

On one computer, click the NitroShare icon and click "Send Directory" and (assuming you want to send your user's data) send Documents, Pictures, ... over one by one.

Warning! Do not send the entire /home directory as that will copy your configuration files as well!

3

Most Gigabit Ethernet (10/100/1000BaseT) adapters have auto MDI/MDIX function. Therefore, if you have it installed in one computer, you can connect it with other computer using a standard Ethernet cable - its a hardware issue not a software issue.

Most modern PC's that have a gigabit ethernet port has this capability - just plug in both PC's - if they talk to each other then at least one computer has one of these ports.

Older PC's you will not be able to do this - you'll need a cross-over cable.

However, its quite easy to create one from a straight cable if you dont want to purchase one specifically.

A Crossover cable is an Ethernet cable (Cat 5, Cat 5e or Cat 6) that has pins 1, 2, 3, 6 on one end crossed to pins 3, 6, 1, 2 on the other end respectively.

Therefore if you are handy with a wire-stripper you can cross-over the correct wires.

  • So, despite IP settings like the one in the accepted answer, older comps cannot use a simple ethernet cable to communicate? (they will need a crossover cable?)) – donatello Sep 4 '11 at 6:21
  • 1
    correct - both computers need a static IP address in the same subnet. But at least one computer needs the MDIX function. If both dont then you need a crossover - or a switch/router which both computers can connect to. – fossfreedom Sep 4 '11 at 8:14
3

In addition to the configuration in other answers (on setting IP addresses), I'd recommend Giver as a program to transfer stuff easily between two computers.

Giver screenshot with single user

3

I will install ssh-server on ubuntu machine, and winscp on windows. Both task are trivial, and then you can Total-commander-like copy files.

  1. install openssh-server on ubuntu box

    sudo apt-get install openssh-server

  2. install WinSCP (scp graphical client for windows)

  3. copy files you need.

protected by Community Dec 11 '18 at 10:15

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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