- Joined
- Jun 8, 2021
- Messages
- 1,017
- Reaction score
- 1,206
- Trophies
- 2
- Location
- nowhere in particular
- XP
- 3,280
- Country

Greetings Linux League! Today I figured out how to transfer files between two linux computers by using an ethernet cable! Transferring files by using wi-fi works for me, but ethernet puts it in the dust by how much of a difference the speeds are. Wi-fi transfers between my two computers are around 3 mbps, while through the ethernet cable they are 100+ mbps, a big difference. Because all of the guides I found online were overly-complicated, I thought I'd share what I found on my own.
1. use command ip link to find the name of your ethernet device, usually a device that displays "<BROADCAST,MULTICAST,UP,LOWER_UP>" that's other than your main wireless card like wlan0. for me, my ethernet device started with an "e" letter on both of my computers, so maybe that will help narrow down your options.
2. If the ip link command doesn't show any useful ip addresses on your ethernet device, then you must assign one to it. This can be done by:
sudo ip addr add 192.168.x.x/24 dev [ETHERNET-DEVICE]
sudo ip link set [ETHERNET-DEVICE] up
with [ETHERNET-DEVICE] representing it's namesake and "x.x" in the ip address any numbers you want, although [1-2].[1-99] would probably work better since it usually wouldn't conflict with any other device's ip address. Run the same command on the 2nd computer, making sure to give it different numbers in the last "x" section. Now run command ip link again on each computer to verify that the new ip addresses are under your ethernet devices, If not then repeat section 2.
3. now with the ip addresses assigned, use the ping command to test them. If they send data back, then you are successful. You may now ssh into one computer from the other one by using the new ethernet ip address. If ssh is successful, then you can use commands like scp or sftp to transfer files between the two. Congratulations if it works!
Bonus. Many file explorers on linux can browse drives over the network, therfore you can put your ssh info into their dedicated network wizards and access files graphically, as if the other computer is a drive physically connected.
1. use command ip link to find the name of your ethernet device, usually a device that displays "<BROADCAST,MULTICAST,UP,LOWER_UP>" that's other than your main wireless card like wlan0. for me, my ethernet device started with an "e" letter on both of my computers, so maybe that will help narrow down your options.
2. If the ip link command doesn't show any useful ip addresses on your ethernet device, then you must assign one to it. This can be done by:
sudo ip addr add 192.168.x.x/24 dev [ETHERNET-DEVICE]
sudo ip link set [ETHERNET-DEVICE] up
with [ETHERNET-DEVICE] representing it's namesake and "x.x" in the ip address any numbers you want, although [1-2].[1-99] would probably work better since it usually wouldn't conflict with any other device's ip address. Run the same command on the 2nd computer, making sure to give it different numbers in the last "x" section. Now run command ip link again on each computer to verify that the new ip addresses are under your ethernet devices, If not then repeat section 2.
3. now with the ip addresses assigned, use the ping command to test them. If they send data back, then you are successful. You may now ssh into one computer from the other one by using the new ethernet ip address. If ssh is successful, then you can use commands like scp or sftp to transfer files between the two. Congratulations if it works!

Bonus. Many file explorers on linux can browse drives over the network, therfore you can put your ssh info into their dedicated network wizards and access files graphically, as if the other computer is a drive physically connected.





