尝试https://askubuntu.com/a/892739/664380
首先(https://askubuntu.com/a/164351/664380)
$ sudo mv /etc/resolv.conf /etc/backup.resolv.conf
然后运行(https://askubuntu.com/a/835198/664380)
$ ifconfig
并查看您的网络适配器的名称。我的是:enp0s31f6
现在运行此命令
$ sudo nano /etc/network/interfaces
并且您应该在里面放一些东西。...删除所有内容并将其粘贴(但是更改enp0s31f6所在的网络适配器名称):
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
# The primary network interface
auto enp0s31f6
iface enp0s31f6 inet dhcp
保存文档并重新启动...