# iwgetid -h Usage iwgetid [OPTIONS] [ifname] Options are: -a,--ap Print the access point address -c,--channel Print the current channel -f,--freq Print the current frequency -m,--mode Print the current mode -p,--protocol Print the protocol name -r,--raw Format the output as raw value for shell scripts -s,--scheme Format the output as a PCMCIA scheme identifier -h,--help Print this message
# iw Usage: iw [options] command Options: --debug enable netlink debugging --version show version (5.19) Commands: dev ap stop dev ap start phy coalesce show phy coalesce disable phy coalesce enable dev auth <type:open|shared> in MHz> [key 0:abcde d:1:6162636465] dev connect [-w] [in MHz>] [] [auth open|shared] [key 0:abcde d:1:6162636465] [mfp:req/opt/no] dev disconnect dev cqm rssi [] event [-t|-T|-r] [-f] dev ftm start_responder [lci=in hex>] [civic=in hex>] dev ftm get_stats phy hwsim wakequeues phy hwsim stopqueues phy hwsim setps phy hwsim getps dev ibss join in MHz> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [fixed-freq] [] [beacon-interval ] [basic-rates in Mbps,rate2,...>] [mcast-rate in Mbps>] [key d:0:abcde] dev ibss leave features commands phy list phy info dev switch channel [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons ] [block-tx] dev switch freq [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons ] [block-tx] dev switch freq [5|10|20|40|80|80+80|160] [ []] [beacons ] [block-tx] dev dev info dev del dev interface add type <type> [mesh_id ] [4addr on|off] [flags *] [addr ] phy interface add type <type> [mesh_id ] [4addr on|off] [flags *] [addr ] help [command] dev link dev measurement ftm_request [timeout=] [randomise[=/]] dev mesh_param dump dev mesh leave
......
常用命令如下
:
iw dev # 显示无线网络设备信息 iw dev wlan0 info # 显示指定无线网络设备的详细信息 iw dev wlan0 scan # 扫描周围热点信息 iw dev wlan0 link # 获得连接状态 iw dev wlan0 station dump # 列出所有STA信息 iw dev wlan0 connect wifi名称 # 连接至OPEN方式的AP iw dev wlan0 connect wifi名称 2432 # 有同名热点AP时指定特定频段 iw dev wlan0 connect wifi名称 key 0:密码 d:1:默认密码 # 连接至WEP加密方式的AP iw dev wlan0 disconnect # 断开连接 iw phy # 显示无线设备的物理特性和功能 iw phy phy0 info # 显示支持的无线标准 iw phy phy0 wowlan show # 查看wowlan状态 iw phy phy0 wowlan enable# 使能wowlan,漫游功能需要
drivers: nl80211 = Linux nl80211/cfg80211 options: -b = optional bridge interface name -B = run daemon in
the background -c = Configuration file -C = ctrl_interface parameter (only used if -c is not) -d = increase debugging verbosity (-dd even more) -D = driver name (can be multiple drivers: nl80211,wext) -e = entropy file -g = global ctrl_interface -G = global ctrl_interface group -h = show this help text -H = connect to a hostapd instance to manage state changes -i = interface name -I = additional configuration file -K = include keys (passwords, etc.) in debug output -L = show license (BSD) -m = Configuration file for the P2P Device interface -N = start describing new interface -o = override driver parameter for new interfaces -O = override ctrl_interface parameter for new interfaces -p = driver parameters -P = PID file -q = decrease debugging verbosity (-qq even less) -s = log output to syslog instead of stdout -t = include timestamp in debug messages -v = show version -W = waitfor a control interface monitor before starting example: wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf
wpa_cli v2.9 Copyright (c) 2004-2019, Jouni Malinen and contributors
This software may be distributed under the terms of the BSD license. See README for more details.
Selected interface 'wlan0'
Interactive mode > > > help# 输入help可以查看所有支持的命令 commands: status [verbose] = get current WPA/EAPOL/EAP status ifname = get current interface name ping = pings wpa_supplicant relog = re-open log-file (allow rolling logs) note = add a note to wpa_supplicant debug log mib = get MIB variables (dot1x, dot11) help [command] = show usage help interface [ifname] = show interfaces/select interface
-i IFACE Interface to use (default eth0) -s PROG Run PROG at DHCP events (default /usr/share/udhcpc/default.script) -p FILE Create pidfile -B Request broadcast replies -t N Send up to N discover packets (default 3) -T SEC Pause between packets (default 3) -A SEC Wait if lease is not obtained (default 20) -b Background if lease is not obtained -n Exit if lease is not obtained -q Exit after obtaining lease -R Release IP on exit -f Run in foreground -S Log to syslog too -a[MSEC] Validate offered address with ARP ping -r IP Request this IP address -o Don't request any options (unless -O is given) -O OPT Request option OPT from server (cumulative) -x OPT:VAL Include option OPT in sent packets (cumulative) Examples of string, numeric, and hex byte opts: -x hostname:bbox - option 12 -x lease:3600 - option 51 (lease time) -x 0x3d:0100BEEFC0FFEE - option 61 (client id) -x 14:'"dumpfile"' - option 14 (shell-quoted) -F NAME Ask server to update DNS mapping for NAME -V VENDOR Vendor identifier (default 'udhcp VERSION') -C Don't send MAC as client identifier Signals: USR1 Renew lease USR2 Release lease
options: -h show this usage -d show more debug messages (-dd for even more) -B run daemon in the background -e entropy file -g global control interface path -G group for control interfaces -P PID file -K include key data in debug messages -i list of interface names to use -s log output to syslog instead of stdout -S start all the interfaces synchronously -t include timestamps in some debug messages -v show hostapd version