本文最后更新于:2025年4月14日 晚上
突然发现我的 Ubuntu 22.04 里没有有线连接的配置项,本文记录解决方案。
问题复现

没有有线连接配置项,插网线也不行。
解决方案
输入命令:
检查 network 的状态,当前出问题的输出为:
1 2 3 4 5 6 7 8 9 10 11 12
| *-network:1 UNCLAIMED description: Ethernet controller product: Ethernet Connection (17) I219-LM vendor: Intel Corporation physical id: 1f.6 bus info: pci@0000:00:1f.6 version: 11 width: 32 bits clock: 33MHz capabilities: pm msi cap_list configuration: latency=0 resources: memory:75280000-7529ffff
|
UNCLAIMED
可以理解为未激活的状态,另一种异常为 DISABLED
DISABLED
如果遇到 DISABLED 状态:
1
| ls /etc/NetworkManager/conf.d/
|
1 2
| sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf sudo systemctl restart NetworkManager
|
问题解决!
UNCLAIMED
修改NetworkManager配置
1
| sudo vi /etc/NetworkManager/NetworkManager.conf
|

将managed=false修改为managed=true,保存并退出
1 2 3
| sudo service NetworkManager stop sudo rm /var/lib/NetworkManager/NetworkManager.state sudo service NetworkManager start
|
重启 Ubuntu ,问题解决。
解决后
重新查看 sudo lshw -c Network
命令:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| *-network:1 description: Ethernet interface product: Ethernet Connection (17) I219-LM vendor: Intel Corporation physical id: 1f.6 bus info: pci@0000:00:1f.6 logical name: enp0s31f6 version: 11 serial: 4c:d7:17:97:c2:7b size: 1Gbit/s capacity: 1Gbit/s width: 32 bits clock: 33MHz capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=6.5.0-28-generic duplex=full firmware=2.3-4 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s resources: irq:145 memory:75280000-7529ffff
|
出现了 Wired 选项

参考资料
文章链接:
https://www.zywvvd.com/notes/system/linux/ubuntu-wired-conn-lost/ubuntu-wired-conn-lost/