how to establish a high speed direct connection between two Linux computers to copy a…
- User
how to establish a high speed direct connection between two Linux computers to copy a folder by rsync? Wifi router is not fast enough. Options include: HDMI cable, USB-C cable, bluetooth, wifi, etc Both machines have USB-C and HDMI ports. What is the easiest, simplest, quickest way to do it? I already tried to connect the two machines by USB-C but none of them recognizes the other machine. $sudo dmesg : nothing new appearing Can I use direct wifi or HDMI or USB-C?
Assistant
To establish a high-speed direct connection between two Linux computers for fast rsync file transfers, the best options are:
Best Option: Direct Ethernet Connection (Crossover Cable or Switch)
- Fastest & most reliable (1 Gbps or higher if NICs support it).
- Connect both machines via an Ethernet cable (if NICs support auto-MDI-X, a regular cable works; otherwise, use a crossover cable).
- Assign static IPs (e.g.,
192.168.1.1and192.168.1.2):sudo ip addr add 192.168.1.1/24 dev eth0 # On PC1 sudo ip addr add 192.168.1.2/24 dev eth0 # On PC2 - Test connectivity:
ping 192.168.1.2 - Use rsync:
rsync -avz /path/to/folder/ 192.168.1.2:/path/to/destination/
Alternative Option: Ad-Hoc Wi-Fi (No Router Needed)
- If Ethernet is unavailable, set up a direct Wi-Fi ad-hoc network:
sudo iwconfig wlan0 mode ad-hoc sudo iwconfig wlan0 essid "DirectLink" sudo ifconfig wlan0 192.168.1.1 netmask 255.255.255.0 # On PC1 sudo ifconfig wlan0 192.168.1.2 netmask 255.255.255.0 # On PC2 - Then use rsync as above.
Why USB-C or HDMI Won’t Work Directly
- USB-C requires USB networking drivers (like
usbnetorrndis_host). Most Linux PCs don’t auto-detect USB-C as a network link. - HDMI is video-only, no data transfer capability.
If You Really Want USB-C Networking
- Check if the USB-C ports support USB Ethernet (e.g., Thunderbolt 3/4 or USB4).
- Try loading the
rndis_hostdriver:sudo modprobe rndis_host - Connect the two machines via USB-C and check
ip linkfor a new interface.
Bluetooth (Slow, Not Recommended)
- Max speed ~2 Mbps, much slower than Ethernet/Wi-Fi.
Conclusion
- Best: Use Ethernet (crossover or switch).
- Fallback: Ad-hoc Wi-Fi if Ethernet is unavailable.
- Avoid: USB-C/HDMI unless you have specific hardware support.
Let me know if you need help setting up any of these!
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.