Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 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.

share|improve this question
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 '13 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 '14 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 '14 at 8:10
up vote 2 down vote accepted

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".

share|improve this answer

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.

share|improve this answer
I was afraid of that. Thanks for your time though! – SkylarMT Sep 1 '13 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.

share|improve this answer
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. – SkylarMT Sep 1 '13 at 1:42

Your Answer


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.