I have two Linux boxes. One is running KNOPPIX and the other Ubuntu. I have only one wifi dongle between them, and only one of them has an Ethernet port. They both have free USB ports however. I need the box with the dongle to share the connection through a male-to-male USB cable.

I know it is possible to do a similar setup with a desktop and certain portable devices, but I need it between two normal computers. I cannot buy any additional hardware.

  • USB doesn't work that way and can't be used to network 2 computers directly. Your best bet is to find an USB/Ethernet adapter, or another Wi-Fi dongle.
    – Renan
    Aug 29, 2013 at 17:04
  • I am already doing this on a window System.Sharing Internet of PC via USB to a my mobile. now m looking for a way to do the same on my linux box.
    – user77668
    Jul 16, 2014 at 4:05
  • @Gagan Your smartphone can act as both a host and device (USB OTG), your laptop doesn't. It's easier to insert an Ethernet cable in between.
    – Lekensteyn
    Jul 16, 2014 at 8:10
  • Now that's USB-C is a thing, this question shines in a new light.
    – Ale
    Dec 9, 2019 at 1:57

3 Answers 3


Without any deeper knowledge, I would suggest looking at the Linux USB Project, section USB Host-to-Host Cables, and possibly Easy Transfer Cable (although that seems to be mainly a Windows thingy). In any case you are likely to need additional hardware, because the cable probably is not "just wires".


This is impossible, unfortunately. All USB connections must be between a host device (e.g. a computer) and a normal USB device (mouse, etc.). Desktops and laptops are always hosts and therefore cannot connect to each other. Some newer mobile devices implement the USB On-The-Go standard, and can switch between being hosts and normal devices, but this won't be the case for your computers.

  • I was afraid of that. Thanks for your time though! Sep 1, 2013 at 1:42

There is no such thing as a USB male-to-male cable, or at least, if some idiot made one it would explicitly violate the USB standard. The closest thing to it is something like a laplink cable, which is a USB device in the middle that has two male cables coming out of it. As far as I know, these use proprietary software to communicate with the device and ask it to relay to the other computer. As such, it won't work as a normal network interface in Linux.

  • 1
    Well, I have a male-to-male cable. It came with a cheap digital camera stick thing, which had a full size USB port to connect to the computer. Sep 1, 2013 at 1:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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