我的netplan
配置/etc/netplan/wireless.yaml
似乎适用于我的 WiFi 到 USB 适配器,但我似乎仍然可以启动本机接口。我宁愿保持这种状态。现在,sudo ifconfig wlp0s20f3 down
似乎并没有通过配置在重新启动后持续存在:
# See also: https://netplan.io/reference
network:
version: 2
renderer: networkd
wifis:
wlx7ca7b0babcf7:
dhcp4: yes
dhcp6: no
addresses: [192.168.7.12/24]
gateway4: 192.168.7.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
access-points:
"my_network":
password: "my_password"
如何调整我的 netplan 配置以保持原生 WiFi 接口关闭?那是只能配置为在其他地方永久关闭的东西吗?
附加信息
$ cat /etc/network/interfaces
# ifupdown has been replaced by netplan(5) on this system. See
# /etc/netplan for current configuration.
# To re-enable ifupdown on this system, you can run:
# sudo apt install ifupdown
注意我有一个连接到的 LAN:
$ sudo lshw -C network
*-network
description: Wireless interface
product: Intel Corporation
vendor: Intel Corporation
physical id: 14.3
bus info: pci@0000:00:14.3
logical name: wlp0s20f3
version: 00
serial: 0c:dd:24:1c:52:55
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=5.3.0-7629-generic firmware=48.4fa0041f.0 ip=10.53.189.39 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: irq:16 memory:d3510000-d3513fff
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0.1
bus info: pci@0000:26:00.1
logical name: ethA
version: 12
serial: 80:fa:5b:7a:b1:cc
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 firmware=rtl8411-2_0.0.1 07/08/13 latency=0 link=no multicast=yes port=MII
resources: irq:16 ioport:4000(size=256) memory:d3215000-d3215fff memory:d3210000-d3213fff
*-network:0
description: Ethernet interface
physical id: 1
logical name: ethA.200
serial: 80:fa:5b:7a:b1:cc
capacity: 1Gbit/s
capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=802.1Q VLAN Support driverversion=1.8 firmware=N/A link=no multicast=yes port=MII
*-network:1
description: Wireless interface
physical id: 2
bus info: usb@1:3
logical name: wlx7ca7b0babcf7
serial: 7c:a7:b0:ba:bc:f7
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=rtl88x2bu multicast=yes wireless=unassociated
/etc/netplan/01-network-manager-all.yaml
有内容:
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager