Linux League
Discuss your favorite Linux distros here.

For everything Linux, there's Linux League!
Linux League

Linux League

Transfer files between two linux computers using an ethernet cable [TUTORIAL]

  • Thread starter Thread starter Plazorn
  • Start date Start date
  • Views Views 512
  • Replies Replies 0
  • Likes Likes 2

Plazorn

<= GBAtemp’s Dragon =>
Member
Joined
Jun 8, 2021
Messages
1,017
Reaction score
1,206
Trophies
2
Location
nowhere in particular
XP
3,280
Country
United States
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! :grog:

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.
 
  • Like
  • Love
Reactions: Flame and SylverReZ

Group statistics

Group owner:
linuxares
Members:
53
Threads:
9
Messages:
89
Photos:
1

Latest photos

Site & Scene News