Ubuntu 17.04可以连接外网,但是不能上网的解决方法

Ubuntu 17.04可以连接外网,但是不能上网的解决方法(原因其实是,无线网卡和有线网卡ip不能同时有用):

把无线网卡或者有线网卡给禁了,就可以了,使用命令(禁止有线网卡enp7s0):

ifconfig enp7s0 down(或者ifdown enp7s0),再使用ifconfig 会看不到有线网卡enp7s0.

或者将:

sudo vi /etc/network/interfaces打开之后,全部注释了,然后重启网络

#auto enp7s0                  #设置自动启动eth0接口
#iface enp7s0  inet static     #配置静态IP
#address 192.168.11.88      #IP地址
#netmask 255.255.255.0      #子网掩码
#gateway 192.168.11.1        #默认网关

猜你喜欢

转载自blog.csdn.net/weixin_39465823/article/details/83818479
今日推荐