- 运行
ifconfig
,只显示lo
或wifi网卡 - 运行
ifconfig -a
,能显示有线网卡 - 运行
ifconfig enp7s0 up
后使用ifconfig
能显示有线网卡,但是仍然没有有线网
解决方法:
sudo gedit /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf
将文件中原来的
[keyfile]
unmanaged-devices=*,except:type:wifi,except:type:wwan
更改为
[keyfile]
unmanaged-devices=*,except:type:ethernet,except:type:wifi,except:type:wwan
然后运行
sudo service network-manager restart