这篇文章上次修改于 1538 天前,可能其部分内容已经发生变化,如有疑问可询问作者。
查看本地网卡的逻辑名称
sudo lshw -C network | grep 'logical name'
root@ubuntu:~# sudo lshw -C network | grep 'logical name'
logical name: ens33
logical name: vethefcf7c9
获取到逻辑名称后编辑网卡配置文件
vim /etc/network/interfaces
将网卡更换为上面命令的结果即可
# 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/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto ens33
iface ens33 inet dhcp
# This is an autoconfigured IPv6 interface
iface ens33 inet6 auto
执行命令查看网卡状态
systemctl status networking.service
至此差不多就可以恢复了。
没有评论