Since the company’s desktop computer is connected to the company’s intranet, it cannot access the external network, and the application is too slow, so it uses a personal laptop (windows) to provide a network for ubuntu. The specific implementation method is as follows:
1. Settings on windows
1. After connecting to wifi, open "Network and Settings Center"-"Change Adapter Settings"-"Find your current wireless network card"-Properties-Sharing-"Allow", then select Local Connection-Confirm Box, OK-OK.
2. Set the local connection ip to 192.168.137.1, and the subnet mask is automatically generated
2. Settings on ubuntu
1. Enter the following command on the terminal sudo gedit /etc/network/interfaces, edit the /etc/network/interfaces file, here assume that the network card is eth0, add the following content to the file:
inet eth0 iface static
address 192.168.137.2
gateway 192.168.137.1
netmask 255.255.255.0
Save the file (Ctrl+S)
2. Enter the following command on the terminal sudo gedit /etc/reslov.conf, edit the /etc/reslov.conf file, and add the following content to the file:
nameserver 192.168.137.1
Save the file (Ctrl+S)
Finally, change the IPv4 mode of the wired connection in Ubuntu to automatic to achieve network access.