How to USB tether phone's internet to a Raspberry Pi 2 running Ubuntu Server?

I have installed Ubuntu Server 20.04 in my Raspberry Pi. I am trying to connect it to internet via USB tethering from my Android phone (and it does show up as usb0 when I run ip link). Somehow the Raspberry Pi cannot access internet (I tried sudo apt update and ping 8.8.8.8, both failed).

In Raspberry Pi OS, the same Raspberry Pi works with the same phone.

How to use phone's USB tethering in Ubuntu Server?

Is there a package I can install to enable USB tethering? Then I can download that in another computer and install it offline.

1

1 Answer

I've also been looking for answer to this question. Then I found the answer on

If it already appears as usb0 when doing ip link, it's already a good sign, the last thing we need is to assign an ip address to that usb0 by using dhcpcd.

To install dhcpcd:

sudo apt install dhcpcd5

Assign IP to usb0 by asking the dhcp server:

sudo dhcpcd usb0

It should work now

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like