I have the same problem as this question( How do I connect my desktop and my laptop using an ethernet cable to transfer files? ).

I could not comment on the answer selected by OP, because of not having enough reputation. That's why I am posting my query as another question for clear answer.

My question is: How do I set the ip address for each machine? Because I have connected the windows laptop with ubuntu laptop with ethernet cat6 patch cable, but the windows laptop shows it to be an unidentified network. So, then I tried to change my ipv4 addresses for the ethernet connection on both machines and did this respectively with no luck(I could not post images directly because of not enough reputation and so, gave the links instead)

Windows 8.1, Ubuntu 14.04.3

P.S: I am fairly new to networking and Linux. So, any detailed help on this will be much appreciated. Moreover, yes, I have googled, but could not find/understand a solution or got a solution to work for my problem.


On the Linux machine run this command:

sudo ifconfig address netmask

On the windows machine, you will need to run a command prompt as Administrator and run this command:

netsh interface ip set address name="Local Area Connection" static 1

You can replace the 169.254.*.* with whatever almost address you want, although it is highly recommended to stay in the 169.254.*.* block.

Keep in mind that Windows will always say Unknown Network for an ad-hoc connection like this. The only way to get around it is to buy a router or a switch. If you want to enable Homegroup, then you'll need to change your network location (multiple ways to do so in Windows, covered here) to private/Home.

|improve this answer|||||
  • Thank you for your help and the info. I figured out from your answer that I did not need to enter a default gateway address in Ubuntu settings and made it work. Now, both machines are connected via ethernet patch cable and are sharing a folder. – Asiful Nobel Sep 24 '15 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.