手机usb共享给linux(Ubuntu)上网

有的时候需要在电脑上完成工作,但是没有Wifi或宽带怎么办
手机开热点,让电脑连?可以,如果我说,电脑没有装无线网卡驱动呢,怎么办?

有请usb网络共享出场,我的电脑装了Ubuntu系统,最小化安装,没有装无线网卡驱动,需要连网
安卓手机在设置里开启”usb网络共享”, 然后电脑里在终端执行如下命令自动获取ip地址就可以了:


sudo dhclient

测试一下网络是否连通:


arisskz6 in ~ λ ping -c 4 114.114.114.114
PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data.
64 bytes from 114.114.114.114: icmp_seq=1 ttl=85 time=92.6 ms
64 bytes from 114.114.114.114: icmp_seq=2 ttl=63 time=51.4 ms
64 bytes from 114.114.114.114: icmp_seq=3 ttl=71 time=47.7 ms
64 bytes from 114.114.114.114: icmp_seq=4 ttl=81 time=57.9 ms

— 114.114.114.114 ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 47.794/62.450/92.614/17.796 ms

OK