现象
nmtui无法管理网卡配置,报错提示该网卡未被管理
nmcli device status中网卡status显示unmaged
第一步
cd /etc/NetworkManager/
cat NetworkManager.conf
#sudo apt-get install network-manager
#如果提示不存在就需要安装network-manager
sudo sed -i 's/managed=.*/managed=true/' NetworkManager.conf
sudo cat NetworkManager.conf
sudo systemctl restart NetworkManager
第二步
cd /usr/lib/NetworkManager/conf.d/
sudo cp 10-globally-managed-devices.conf 10-globally-managed-devices.conf.bak
sudo sed -i '/unmanaged-devices/s/$/&,except:type:ethernet/' 10-globally-managed-devices.conf
sudo cat 10-globally-managed-devices.conf
sudo systemctl restart NetworkManager