I have seen people connect two computers with an Ethernet cable, but the instructions I've seen were for Windows to Windows or Mac to Mac or Windows to Mac. I never came across any for connecting Windows to Linux. Is it possible to connect a Windows system to a Linux system via Ethernet cable?
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:
- check current IP for example Start,
cmdto open a terminal, run
- write down the current IP(s) to compare later
- attach the Ethernet cable to both machines so they are now physically connected to each other
- get the new IP: Start,
cmdto open a command prompt, run
- comparing with your previously copied IPs, see which new IP appears, and copy it down for example it may resemble:
- 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
iPv4, use these settings
Manual. Otherwise default Automatic (DHCP) does not let you set an IP
169.254.123.105. The point is to use same IP except for last segment to be on the same subnet so if one is
a.b.c.101then you should be
- gateway: leave blank
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.
- Now choose your new
direct-ethernetwork, for example status bar click it
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.
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.???
I used a direct ethernet connection between Fedora 25 and Windows 7 to copy files to a new computer.
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.
- 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
As in user454038's answer, create a new IPv4 connection (or edit your normal one, but then you'll have to edit it back)
- 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.
On Linux, using a graphical manager, create an Ethernet connection. Select your LAN card interface for that connection (run the command "ifconfig" in a terminal and to the left you will see interface names like enp0s18f2u6 or enp2s0). Set firewall zone to "trusted". In IPv4 settings, mark that IPv4 is necessary for the connection (IPv6 can be ignored). Set manual address: 192.168.1.1 (this type of address is called a private address) and net mask 255.255.255.0. Set gateway to 192.168.1.2 (this will be the address of your second PC with Windows [but not necessarily, these steps are generally OS independent]). Turn on the connection (you might want to set the connection to automatic at boot time, set as not metered, and all users can connect).
Now on Windows: set the LAN interface address (the one for the network card, that is in your LAN): 192.168.1.2, net mask 255.255.255.0 and default gateway of the Linux PC: 192.168.1.1. (You do this by going to "Network and Sharing Center"->"change adapter settings", and pick your network interface here, that corresponds to your LAN card that is connected to the other PC. Right click on that interface icon and select "Properties", unselect Internet Protocol Version 6, and double click "Internet Protocol Version 4". Now you enter the address 192.168.1.2 - this will be the address of your Windows PC on that interface (on that [LAN/Ethernet] connection)). Tab down so netmask is filled out automatically (255.255.255.0). Now as the gateway address provide the other PC address: 192.168.1.1).
So putting it short, both PC's must have static addresses and point to each other's addresses as the gateways: computer1 is gateway for computer2, computer2 is gateway for computer1.