使用有线连接安装了 Ubuntu 20.04,然后我尝试通过进入 /etc/netplan 并根据以下条件更改设置来更改为无线https://netplan.io/examples/#connecting-to-a-wpa-personal-wireless-network例如。现在我无法 ping 8.8.8.8 并安装我需要的任何组件。
sudo lshw -C 网络:
*-usb:0
description: Ethernet interface
vendor: Microchip Technology, Inc. (formerly SMSC)
physical id: 1
bus info: usb@1:1.1.1
logical name: eth0
version: 3.00
serial: b8:27:eb:7f:9d:65
capacity: 1Gbit/s
capabilities: usb-2.10 ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=lan78xx link=no maxpower=2mA multicast=yes port=MII speed=480Mbit/s
*-network
description: Wireless interface
physical id: 2
logical name: wlan0
serial: b8:27:eb:2a:c8:30
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=brcmfmac driverversion=7.45.202 firmware=01-72f6ece2 ip=192.168.1.207 multicast=yes wireless=IEEE 802.11
猫/etc/netplan/*.yaml:
ethernets:
eth0:
dhcp4: true
optional: true
version: 2
wifis:
wlan0:
optional: true
access-points:
"Fios-CL7hd":
password: "203406112"
dhcp4: true
addresses: [192.168.1.207/24]
gateway4: 192.168.1.204
nameservers:
addresses: [192.168.1.1, 8.8.8.8]
猫/等/网络/接口:
没有接口目录
答案1
您好,欢迎咨询 Ubunbtu。请分享您的接口详细信息(请参阅下面的评论)。如果您有 wifi 和以太网,您必须选择要从哪个设备 ping ping -I wlan0 8.8.8.8
。