I have an Android with 4G Internet access. I connect it to Ubuntu via a USB cable and enable the USB Tethering in Android. The Ubuntu identify it in “Ethernet Connected” → “Wired connection 2” immediately.
My next step is to share internet from Ubuntu notebook through its built-in Ethernet and WiFi. Here is how.
Share Through Ethernet
I found Sharing Connection to other PCs (Via Wired Ethernet) [duplicate] is very useful but some dialogs have changed in 18.04. cannot share wired network connection in 18.04 has the correct information for 18.04.
- Open a terminal and run nm-connection-editor
- In the “Network Connections” dialog, edit the wired connection.
- In the edit dialog, switch to the “IPV4 Settings” tab.
- Choose “Shared to other computers” in Method.
- Click the “Save” button to apply.
Clicking on the Ethernet or Wifi icon which is located on the upper right corner and “Ethernet Connected” → “Wired Settings” brings up the “Settings” → “Network” tab. There is no “Shared to other computers” option while editing IPV4.
Share Through WiFi
How To Create A Wi-Fi Hotspot In Ubuntu 18.04 / Gnome (And Edit Its Settings) has detail explanation.
First, turn on Wi-Fi.
Then click on the Ethernet or Wifi icon which is located on the upper right corner and “Wi-Fi Not Connected” → “Wi-Fi Settings”. It would bring up the “Settings” → “Wi-Fi” tab. Click on the “Command” icon which looks like three horizontal line stacks together on the dialog border and select “Tuen On Wi-Fi Hotspot”. One more dialog will popup and click on the “Tune on” to confirm.
To configure, launch the “Network Connections” dialog by running nm-connection-editor. Edit the “Hotspot” profile in Wi-Fi. Change SSID in the “Wi-Fi” tab and WPA in the “Wi-Fi Security” tab.