Recently abroad in an hotel with a great Wifi, my computer did not recognize its wifi interface. I then tried connecting my Android phone to the wifi and sharing the connection via USB, but the computer was not discovering it either. Digging a bit, the issue was just that the computer did not enable networking on the device corresponding to the phone and it could be solved with a few commands, just writing it there not to search again the next time it happens.

First step was to get the network used by the phone, for that I used terminal emulator and typed ip addr, it returned

Finding the phone device was done looking at the result of dmesg on the computer right after plugging the phone, for me usb0.

Finally enabling networking on the computer device on the same network (but with a different address) was simply typing:

ip addr add dev usb0
ip link set dev usb0 up