我在 Ubuntu 18.04 上遇到了以太网不受管理的问题。虽然互联网工作正常,但这让我无法设置 vino 屏幕共享。
以下是一些输出:
superuser@SuperTower:~$ nmcli d
DEVICE TYPE STATE CONNECTION
eno1 ethernet unmanaged --
vmnet1 ethernet unmanaged --
vmnet8 ethernet unmanaged --
lo loopback unmanaged --
superuser@SuperTower:~$ ifconfig
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.228 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::ba85:84ff:fea3:c235 prefixlen 64 scopeid 0x20<link>
ether b8:85:84:a3:c2:35 txqueuelen 1000 (Ethernet)
RX packets 1365 bytes 842871 (842.8 KB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 792 bytes 98547 (98.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0x93200000-93220000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 66 bytes 5663 (5.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 66 bytes 5663 (5.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vmnet1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.69.1 netmask 255.255.255.0 broadcast 192.168.69.255
inet6 fe80::250:56ff:fec0:1 prefixlen 64 scopeid 0x20<link>
ether 00:50:56:c0:00:01 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 56 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vmnet8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.16.116.1 netmask 255.255.255.0 broadcast 172.16.116.255
inet6 fe80::250:56ff:fec0:8 prefixlen 64 scopeid 0x20<link>
ether 00:50:56:c0:00:08 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 59 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
superuser@SuperTower:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
superuser@SuperTower:~$ cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=true
[device]
wifi.scan-rand-mac-address=no
superuser@SuperTower:~$ ls -al /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
-rw-r--r-- 1 root root 0 feb 2 23:28 /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
superuser@SuperTower:~$ cat /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf
[keyfile]
unmanaged-devices=none
superuser@SuperTower:~$ cat /etc/netplan/01-network-manager-all.yaml
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
我已经尝试过这里各种问题的解决方案,并且
superuser@SuperTower:~$ sudo nmcli dev set eno1 managed yes
但没有任何帮助。仍然没有得到管理。有什么想法吗?
答案1
这似乎产生了魔力:
superuser@SuperTower:~$ cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=true
[device]
wifi.scan-rand-mac-address=no
superuser@SuperTower:~$ cat /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf
[keyfile]
unmanaged-devices=*,except:type:wifi,except:type:wwan
superuser@SuperTower:~$ cat /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
[keyfile]
unmanaged-devices=none
另外,仅重新启动网络管理器服务也无济于事。只有完全重启。