参考:https://blog.csdn.net/kvpp0307/article/details/106576131/
修改网络配置文件:
sudo vi /etc/netplan/01-network-manager-all.yaml
按照下面的格式进行修改
network: version: 2 ethernets: enp3s0: addresses: [] dhcp4: no bridges: br0: interfaces: [enp3s0] dhcp4: no addresses: [192.168.2.11/24] gateway4: 192.168.2.1 nameservers: addresses: [114.114.114.114]
最后记得执行:
sudo netplan apply