Wifi

從 wlp2s0 中刪除無線接入點需要編輯哪些文件?

  • December 29, 2019
innocent / # nmcli d wifi list
*  SSID               MODE   CHAN  RATE       SIGNAL  BARS  SECURITY 
=========================================================================
  HillBillies        Infra  2     54 Mbit/s  90      ▂▄▆█  WPA2

*  TELPorto           Infra  6     54 Mbit/s  76      ▂▄▆_  WPA1 WPA2 

  NgNetHookup        Infra  6     54 Mbit/s  60      ▂▄▆_  WPA2

我只希望保留TELPortoHillBillies並且NgNetHookup需要被核彈。從閱讀man nmcli中,我無法發現如何編輯該列表。我正在執行 Linux Mint。

發布:無辜/#iw wlp2s0 scan

其中一項是(部分):

BSS f8:c3:9e:5d:2d:b8(on wlp2s0)

   TSF: 127000886994 usec (1d, 11:16:40)
   freq: 2417
   beacon interval: 100 TUs
   capability: ESS Privacy ShortSlotTime RadioMeasure (0x1411)
   signal: -50.00 dBm
   last seen: 2964 ms ago
   Information elements from Probe Response frame:
   SSID: Ng WiFiLink
   (...)
   (...) /...

發布:無辜/#nmcli -f all dev wifi list

像這樣返回輸出

SSID => Ng WiFiLink
SSID-HEX => 436975612057256961
BSSID => F8:C3:9E:5D:2D:B8
MODE => Infra
CHAN => 2
FREQ => 2417 MHz
RATE => 54 Mbit/s
SIGNAL => 90
BARS => ▂▄▆█
SECURITY => WPA2
WPA-FLAGS => pair_ccmp group_ccmp psk
RSN-FLAGS => wlp2s0
DEVICE  ACTIVE => [  ]   ( * if yes ?)
DBUS-PATH => /org/freedesktop/NetworkManager/AccessPoint/85

發布:無辜/#nmcli -p -f general,wifi-properties device show wlp2s0

====================================================================
                           Device details (wlp2s0)
====================================================================
GENERAL.DEVICE:                         wlp2s0
(...)
(...) /...
GENERAL.CON-UUID:             eb8ab8ea-e616-48ba-a9eb-a6bfdf1ec480
GENERAL.CON-PATH:      /org/freedesktopNetworkManagerActiveConnection/6

以下只是 20 個中的幾個?還是30?yug組合 / 嘗試在某些語法 nmcli 上所做的嘗試將適用於:

嘗試使用 DBUS-PATH // GENERAL.CON-PATH: 無辜 / # nmcli dev disconnect /org/freedesktop/NetworkManager/ActiveConnection/6

錯誤:找不到設備“/org/freedesktop/NetworkManager/AccessPoint/83”。

錯誤:未找到所有設備。

嘗試使用 SSID-HEX:無辜 / # nmcli dev disconnect 436975612057256961

錯誤:未找到設備“436975612057256961”。

錯誤:未找到所有設備。

嘗試使用 UUID:

無辜的系統連接 # nmcli dev disconnect ’eb8ab8ea-e616-48ba-a9eb-a6bfdf1ec480'

錯誤:未找到設備“eb8ab8ea-e616-48ba-a9eb-a6bfdf1ec480”。

錯誤:未找到所有設備。

最後,對於 WIN,使用下面答案中引用的命令之一,來自 GAD3R ,這完成了工作:

無辜的系統連接 # nmcli 連接刪除 id Ng\ WiFiLink

連接“Ng WiFiLink”(eb8ab8ea-e616-48ba-a9eb-a6bfdf1ec480)已成功刪除。無辜的系統連接#

該命令nmcli d wifi list將列出上一次掃描中可用的接入點。您需要通過以下方式刷新AP列表:

nmcli device wifi rescan

然後:

nmcli d wifi list

info nmcli:

wifi rescan [ifname ifname] [ssid SSID...]
       Request that NetworkManager immediately re-scan for available
       access points...

This command does not show the APs, use nmcli device wifi list for that.

保存的配置可以通過以下方式列出:

nmcli connection 

按名稱刪除連接:

nmcli connection delete id 'connection name'

要通過其 UUID 刪除連接:

nmcli connection delete uuid 'connection uuid'

引用自:https://unix.stackexchange.com/questions/559268