How to connect Ubuntu Server 20.04 to android tethering usb using netplan?

This works for me. The method is very basic and simple. I think usb tethering is most fast way to connect to internet, because usb is wired way and faster and more stabile way, than share connection from phone with Wifi hot spot sharing.

  1. Turn on usb tethering on your Samsung phone and connect it with USB to you Ubuntu laptop. On Ubuntu ifconfig should show usb0 device.
  2. On Ubuntu, on your main netplan configuration file, add missing lines
network:
  version: 2
  renderer: networkd
  ethernets:
    usb0:
      dhcp4: yes
      dhcp6: no

This is very basic setting and just means, that Samsung tells with dhcp what it shares. Set dhcp6 on, if you need ipv6.

3)

sudo netplan try

sudo netplan apply