Can I connect a Ubuntu Linux laptop to a Windows 10 laptop via ethernet cable
Solution 1
Yes, as I have done this before, but with Ubuntu-based distros connected to Windows Vista. However this should still work with Windows 10. This is called a direct ethernet connection. There are a few steps to this:
Windows, p1
- check current IP for example Start,
cmd
to open a terminal, runipconfig
- write down the current IP(s) to compare later
Both
- attach the Ethernet cable to both machines so they are now physically connected to each other
Windows, p2
- get the new IP: Start,
cmd
to open a command prompt, runipconfig
- comparing with your previously copied IPs, see which new IP appears, and copy it down for example it may resemble:
169.254.123.101
.
Ubuntu
- get to the network manager, for example click status bar network icon
- Edit Connections
- choose Wired type
- create a new wired connection, naming it something you'll recognize such as
direct-ether
under
iPv4
, use these settings- Method:
Manual
. Otherwise default Automatic (DHCP) does not let you set an IP - address:
169.254.123.105
. The point is to use same IP except for last segment to be on the same subnet so if one isa.b.c.101
then you should bea.b.c.105
for example - netmask:
255.255.0.0
- gateway: leave blank
- Method:
It is at this point, on Lubuntu for example there is weirdness where, when typing address numbers, values "disappear" when typing. Just keep typing and when you Save, it seems the values just appear.
- Save
- Now choose your new
direct-ether
network, for example status bar click it
Test
So now you should have, for example:
- Windows: 169.254.123.101
- Ubuntu: 169.254.123.105
Test the connectivity for example using software that you can access by IP. For example on Windows I had Xampp Portable running which runs an Apache web server. So to test whether Ubuntu could see that web server, I simply opened a browser to http://169.254.123.101
which is the Windows's IP in this example, and could see the Windows' Xampp Portable default page, thus confirming the connectivity.
Solution 2
user454038 pretty much sums it well, but there is the issue of the type of Ethernet cable you need.
When connecting 2 computers together using a direct connection you must use a crossover cable.
And all you have let is to configure each computer's IP, don't forget to use a different IP for each computer :-)
It is custom to use a curtain pattern for internal IP use, for ex.: 192.168.1.???
Solution 3
Yes, this is possible. They talk same protocol - TCP/IP. You just set static addresses on them being in same subnet and they should see themselves.
Solution 4
I used a direct ethernet connection between Fedora 25 and Windows 7 to copy files to a new computer.
Hardware:
Standard ethernet cable (the ethernet cards can detect the direct connection and switch themselves, so a crossover cable is not needed) connecting ethernet ports of both machines.
Windows setup:
- Open network connection settings and manually set a static IP
- Set up network file sharing so that appropriate folders are shared. Some folders have encryption or security settings that may need to be modified
Fedora:
As in user454038's answer, create a new IPv4 connection (or edit your normal one, but then you'll have to edit it back)
- Settings
- Network
- Wired
- Add Profile...
- Set static IP with same subnet mask as windows but a different IP.
With that done, you should see the windows machine appear in Files / Other Locations and be able to copy files across.
- When finished, reconnect ethernet cables to connect to the internet and switch network profiles by clicking on the original one.
Related videos on Youtube
Amogh Natu
Updated on September 18, 2022Comments
-
Amogh Natu over 1 year
I'm working on a scenario wherein I need to move some files from one FTP location to another. The FTP server is the same but credentials for the source and destination are different.
For example,
I need to copy files
FROM
"ftp://sampleftp.com/sourceFolder" with login credentials "User1", "Password1"
TO
"ftp://sampleftp.com/destinationFolder" with login credentials "user2","password_2"
Kindly note the different credentials I have used above for source and destination.
I referred to this similar stackoverflow question link but that seems to work for the FTP folder with constant login credentials.
Can someone please guide me on how best can I implement this?
-
smw over 8 yearsIIRC Ubuntu's
network-manager
also has a 'Link Local Only' IPv4 option that will automatically choose an available 169.254.x.x address -
user148564 over 7 yearsI know modern switches and routers can. I didn't know that the PC's adapter can do this as well.