我有一台全新的 HP 电脑,安装了 Windows,并且我双启动了 Ubuntu 22.04.2 LTS。不幸的是,没有互联网,我尝试了很多说明,但没有结果。我有:
- nmcli 命令:
enp1s0: connected to Wired connection 1
"Realtek RTL8111/8168/8411"
ethernet (r8169), 7C:57:58:5F:52:E5, hw, mtu 1500
ip4 default
inet4 192.168.1.13/24
route4 192.168.1.0/24 metric 100
route4 169.254.0.0/16 metric 1000
route4 default via 192.168.1.1 metric 100
inet6 fe80::f32e:43c8:a863:6ff1/64
route6 fe80::/64 metric 1024
lo: unmanaged
"lo"
loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536
DNS configuration:
servers: 91.227.2.157 8.8.8.8 192.168.1.1
interface: enp1s0
Use "nmcli device show" to get complete information about known devices and
"nmcli connection show" to get an overview on active connection profiles.
Consult nmcli(1) and nmcli-examples(7) manual pages for complete usage details.
- lshw -C 网络命令:
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:01:00.0
logical name: enp1s0
version: 15
serial: 7c:57:58:5f:52:e5
size: 100Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.19.0-45-generic duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.1.13 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
resources: irq:55 ioport:3000(size=256) memory:fb604000-fb604fff memory:fb600000-fb603fff
*-network UNCLAIMED
description: Network controller
product: Realtek Semiconductor Co., Ltd.
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:02:00.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: cap_list
configuration: latency=0
resources: ioport:2000(size=256) memory:fb500000-fb5fffff
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.
我将非常感谢一步一步的解释,因为我大约一周都不能使用 Ubuntu。
答案1
如果 nmcli 没有看到界面,则可能是驱动程序问题。您可能会很幸运地发现在“软件和更新”>“附加驱动程序”下有一个可以安装的驱动程序。
另外要注意的一点是,实际上在 Windows 下,取消勾选与 wifi 或蓝牙相关的所有省电选项。Windows 驱动程序可能会在设备关闭时关闭设备,然后 ubuntu 无法将其重新打开。我见过 HP 笔记本电脑这样做。
看起来 lshw 也看不到它,那个 realtek 设备看起来像你的以太网。
另一个问题是,有时你可能会遇到冲突的内核模块,导致无法加载正确的驱动程序。你需要知道它是什么设备,才能解决这个问题。
您可以使用 lspci 或 lsusb 命令获取设备上的 ID。