AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-113579

tarabyte's questions

Martin Hope
tarabyte
Asked: 2020-06-25 10:58:50 +0800 CST

如何使用 netplan 禁用 WiFi 接口?

  • 1

我的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

也可以看看

https://unix.stackexchange.com/a/111258/32951

networking wireless netplan
  • 2 个回答
  • 13529 Views
Martin Hope
tarabyte
Asked: 2020-04-17 10:59:49 +0800 CST

如何找到需要重启的原因?

  • 1

有没有办法了解为什么我的 Ubuntu 系统需要重启?我在通过 SSH 登录的横幅中收到此消息,但没有太多额外的上下文:

*** System restart required ***
restart
  • 1 个回答
  • 1169 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve