Is Data Transfer between 2 Ubuntu Machines possible via USB-Cable?

8,789

Solution 1

When you say, USB cable you are referring to a Windows Easy Transfer Cable, right?

enter image description here

In that case, the easiest way to do this is to just hook the two machines directly together with an Ethernet cable. Modern NICs are smart enough that you don't even need a crossover cable; they just automatically crossover when they detect that you connected two computers.

Solution 2

If you absolutely had to do this for a proof of concept you could simulate the ancient art of "laplink" transfers by emulating a serial port on each machine.

Usb to serial on one, and usb to serial (null modem) in the other, sorting out gender issues in the middle.

It would not be quick.

Solution 3

Firewire might also be an option. https://help.ubuntu.com/community/EthernetOverFirewire

Share:
8,789

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin almost 2 years

    I have two machines with Ubuntu 14.04, right next to each other. But no network ((W)LAN). Can I transfer data from one machine to the other via usb-cable? And if so, how?

  • Chris Stratton
    Chris Stratton about 7 years
    From what I've heard, USB transfer cables as pictured are typically treated as a type of network in Linux anyway. Some ultralight laptops don't have wired ethernet jacks, so this could be advantageous - the option might be two USB-Ethernet adapters and an RJ45 patch cord (but though those could then be used for other networking purposes, too).
  • David Schwartz
    David Schwartz about 7 years
    @ChrisStratton That's correct. These cables are essentially two NICs.
  • Chris Stratton
    Chris Stratton about 7 years
    @DavidSchwartz in terms of how Linux traditionally treats them, yes. But Windows sees them completely differently (reportedly cross platform transfer does not work) and architecturally they are probably a pair of FIFOs and some logic sitting between two USB device engines, or even just coordinating logic to create virtual fifos out of a common buffer memory.
  • David Schwartz
    David Schwartz about 7 years
    @ChrisStratton They're pretty much all based on some variant of the Prolific 2501 (2301, 25A1, whatever). Physically, there's two FIFOs between two backend controllers with a microcontroller for management. But that's essentially the same as what you'd get if you connected two NICs to each other. How the driver chooses to present it is, of course, the driver's choice. The same Windows software that works over these cables typically also works over back-to-back NICs unless the manufacturer chose to lock it down.
  • axings
    axings about 7 years
    This, I believe, is the USB 2.0 answer with the USB 3.0 answer being at superuser.com/a/1165890/41259 .
  • Charlie
    Charlie about 7 years
    "It would not be quick."
  • Elder Geek
    Elder Geek about 7 years
    Did you miss "no network ((W)LAN)" in the question?" This is a valid general answer but doesn't appear to take the OP's situation into consideration.
  • You'reAGitForNotUsingGit
    You'reAGitForNotUsingGit about 7 years
    @ElderGeek - No network to me means that the two computers are not on a LAN together. Connecting two computers directly with an Ethernet cable does not require the two machines to be on the same LAN; in fact, it would be physically impossible to connect them directly and have them connected to the LAN simultaneously unless the OP's computer has two NICs
  • Elder Geek
    Elder Geek about 7 years
    @AndroidDev perhaps your right and I just have hardware on the brain this morning. It's true that the question doesn't make it abundantly clear whether they are speaking of interfaces or connections, but it does specifically ask about transfer via usb-cable...
  • MacGuffin
    MacGuffin almost 4 years
    there is a perfectly safe and logical reason for connecting two Linux computers by a USB A-to-A cable. That is to set up a kernel dubug port. kernel.org/doc/html/v5.4/driver-api/usb/usb3-debug-port.html This has been part of the USB spec for nearly a decade. It would be nice to see this feature be used more generally, as in outside of just a kernel debug port. The hardware is there, much of the software is there as well, if we get people used to the idea of using USB to USB connections for more than debug then maybe I'll stop seeing people ask this same question.
  • David Cullen
    David Cullen almost 4 years
    That only applies to USB 3.0. While it may be part of the spec, I still haven't seen a USB 3.0 A-to-A cable in real life. And this is absolutely dangerous with a USB 2.0 A-to-A cable.
  • MacGuffin
    MacGuffin almost 4 years
    If we are going to step into the realm of suggesting USB gadget drivers then to be comprehensive, or perhaps annoyingly pedantic, then we should consider USB 3.x A-to-A cables, which has been part of the USB spec since 2010, and USB-C, which has been part of the spec since 2014. Most any computer made in the last 5 years should support USB 3.x, have USB-C ports, or both, and therefore be capable of data transfer from computer to computer by USB. The problem I'm seeing is finding the correct settings and drivers among the outdated USB 2.0 gadget information that is in abundance on the web.