There is currently only WiFi at my place, but I have a PC (running Ubuntu 16.04) with no card for WiFi built in. I also have a laptop (Ubuntu 16.04 + Windows 7) that has WiFi and a LAN cable. What I want is to get internet on my PC from the laptop's WiFi via the LAN cable. I found instructions for Ubuntu 14.04 here (from the most upvoted answer), followed the steps but it didn't; hope that someone can help. Steps that I did so far:
1) Connected laptop and PC via cable.
2) On the laptop, typed
nm-connection-editor in the terminal, chose 'Wired Connection', clicked on 'Edit' and then selected 'Shared to other computers' as 'Method' under the IPv4 Settings. Typing
hostname -I in the laptop's terminal gave
10.42.0.1 192.168.1.97. (I assumed that the first one is the my IP address as viewed from the outside and the second one is the internal for the network with my PC.)
hostname -I in a terminal on the PC gives only
192.168.1.1. I followed the instructions from the first answer in the link also on the PC, i.e., went to 'Wired Connections', selected 'IPv4 Settings', chose 'Manual' under 'Method', then entered 192.168.1.1 under 'Address', 255.255.255.0 under 'Netmask' and 192.168.1.97 under 'Gateway'. In the field for 'DNS servers' I also put 192.168.1.97.
However, after saving the settings there is still no internet on my PC. Can anyone help? What am I doing wrong?
dpkg -l *dnsmasq* (laptop and PC) gives: un dnsmasq <none> <none> (no description available) ii dnsmasq-base 2.75-1ubuntu0.1.04 amd64 Small caching DNS proxy and DHCP/TFTP server
Now it works! I don't know why but when I started the PC today and connected it to the laptop, it had internet. I haven't changed anything in the settings. Perhaps the system just needed to be restarted. Thanks a lot!