sudo systemctl status NetworkManager
sudo systemctl start NetworkManager
sudo systemctl start NetworkManager
sudo nmcli con down ens3 # 关闭名为 ens3 的连接
sudo nmcli con delete ens3 # 删除该连接
sudo nmcli con add type ethernet ifname ens3 # 重新添加连接
sudo cp /etc/netplan/*.yaml /etc/netplan/*.yaml.bak
sudo nano /etc/netplan/*.yaml
network:
ethernets:
ens3:
dhcp4:true
version: 2
保存文件后,应用更改:
sudo netplan apply
方法三:重启网络服务
sudo systemctl restart systemd-networkd.service
sudo systemctl restart NetworkManager.service # 如果正在使用 Network Manager
sudo journalctl -u systemd-networkd.service
sudo journalctl -u NetworkManager.service # 如果正在使用 Network Manager
微信赞赏
支付宝赞赏