赞
踩
Ubuntu 20.04.3-live-server
无法获取ip不能上网,重启网络出现unit NetworkManager.service not found
ubuntu:~$ service network restart
Failed to restart network.service: Unit network.service not found.
1.查看netplan配置文件
cat /etc/netplan/00-installer-config.yaml
#This is the network config written by 'subiquity'
network:
ethernets:
ens33:
dhcp4: true
version: 2
2.检测netplan配置
netplan try
Warning: Stopping systemd-networkd.service, but it can still be activated by:
systemd-networkd.socket
Do you want to keep these settings?
Press ENTER before the timeout to accept the new configuration
Changes will revert in 97 seconds
Configuration accepted.
按回车
ifconfig看看是否获取到IP,获取到IP网络恢复
3.重启服务器测试,网络正常
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。