Debian10Standard版安装network-manager后,用nmcli,nmtui设置网络时,NetworkManager报"Device Not Managed" 221020记录
现象
root@ds10:~# nmcli connection show
NAME UUID TYPE DEVICE
nmtui010 c888d2f8-2204-45e6-add5-dbdf53ff8f9d ethernet --
root@ds10:~# nmcli connection up nmtui010
Error: Connection activation failed: No suitable device found for this connection (device lo not available because device is strictly unmanaged).
解决办法
查看 /etc/NetworkManager/NetworkManager.conf
sudo cat /etc/NetworkManager/NetworkManager.conf
原先内容
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=false
打开编辑 /etc/NetworkManager/NetworkManager.conf
sudo vi /etc/NetworkManager/NetworkManager.conf
将 managed=false
改为 managed=true
修改后的内容为
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=false
managed=true
👆可以直接将 managed=true
加在 managed=false
下面
重启 NetworkManager
sudo systemctl restart NetworkManager