日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

iw命令 linux 没有_linux下ifconfig、iwconfig、iwlist命令详解

發布時間:2024/9/19 49 豆豆
生活随笔 收集整理的這篇文章主要介紹了 iw命令 linux 没有_linux下ifconfig、iwconfig、iwlist命令详解 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在linux下查看網絡信息。

一、ifconfig

用途:配置網絡信息。

如果沒有參數,將給出當前的active 接口。

# ifconfig

eth0 Link encap:Ethernet HWaddr 02:00:E1:00:11:5A

inet addr:192.168.1.234 Bcast:192.168.1.255 Mask:255.255.254.0

inet6 addr: fe80::e1ff:fe00:115a/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:17338002 errors:0 dropped:11993 overruns:0 frame:0

TX packets:228594 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:1759095713 (1.6 GiB) TX bytes:67780580 (64.6 MiB)

Interrupt:33 Base address:0xc000

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:65536 Metric:1

RX packets:43362 errors:0 dropped:0 overruns:0 frame:0

TX packets:43362 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:4835488 (4.6 MiB) TX bytes:4835488 (4.6 MiB)

wlan0 Link encap:Ethernet HWaddr CC:79:CF:E2:FB:91

inet addr:192.168.50.180 Bcast:192.168.50.255 Mask:255.255.255.0

inet6 addr: fe80::ce79:cfff:fee2:fb91/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:460463 errors:0 dropped:26240 overruns:0 frame:0

TX packets:276794 errors:0 dropped:4 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:159088799 (151.7 MiB) TX bytes:83207394 (79.3 MiB)

這是開發板上的一塊物理網卡和一個wifi模塊。我們可以看到IP信息,網卡地址等等。這個命令還常用來設置網絡信息

其中lo地址是127.0.0.1,這個地址是一個回環地址,代表本機(localhost)。

eg:ifconfig eth0 192.168.1.100. 設置IP有文檔描述此命令即將廢除,取代這個命令的是ip addr和ip link。 可以試試 ip -s link。

二、iwconfig

用途:配置無線網絡接口

iwconfig [interface]

iwconfig?interface?[essid?X] [nwid?N] [modeM] [freq?F]

[channel?C][sens?S?][ap?A?][nick?NN ]

[rate?R] [rts?RT] [frag?FT] [txpower?T]

[enc?E] [key?K] [power?P] [retry?R]

[modu?M] [commit]

描述:iwconfig和ifconfig很相似。但是iwconfig僅僅和無線網絡相關。用來設置參數等。

freq/channel

eg:

iwconfig eth0 freq 2422000000

iwconfig eth0 freq 2.422G

iwconfig eth0 channel 3

iwconfig eth0 channel auto三、iwlist

iwlist:從無線網卡獲取更詳細的無線信息

描述:用于顯示關于無線網絡的額外信息。這些信息往往是iwconfig沒有顯示出來的。

scan:給出可以接入的熱點列表信息。

rate/bit: 列出設備支持的比特率

相關文件: /proc/net/wireless

Usage: iwlist [interface] scanning [essid NNN] [last]

[interface] frequency

[interface] channel

[interface] bitrate

[interface] rate

[interface] encryption

[interface] keys

[interface] power

[interface] txpower

[interface] retry

[interface] ap

[interface] accesspoints

[interface] peers

[interface] event

[interface] auth

[interface] wpakeys

[interface] genie

[interface] modulation

# iwlist wlan0 frequency

wlan0 13 channels in total; available frequencies :

Channel 01 : 2.412 GHz

Channel 02 : 2.417 GHz

Channel 03 : 2.422 GHz

Channel 04 : 2.427 GHz

Channel 05 : 2.432 GHz

Channel 06 : 2.437 GHz

Channel 07 : 2.442 GHz

Channel 08 : 2.447 GHz

Channel 09 : 2.452 GHz

Channel 10 : 2.457 GHz

Channel 11 : 2.462 GHz

Channel 12 : 2.467 GHz

Channel 13 : 2.472 GHz

Current Frequency:2.457 GHz (Channel 10)

# iwlist wlan0 channel

wlan0 13 channels in total; available frequencies :

Channel 01 : 2.412 GHz

Channel 02 : 2.417 GHz

Channel 03 : 2.422 GHz

Channel 04 : 2.427 GHz

Channel 05 : 2.432 GHz

Channel 06 : 2.437 GHz

Channel 07 : 2.442 GHz

Channel 08 : 2.447 GHz

Channel 09 : 2.452 GHz

Channel 10 : 2.457 GHz

Channel 11 : 2.462 GHz

Channel 12 : 2.467 GHz

Channel 13 : 2.472 GHz

Current Frequency:2.457 GHz (Channel 10)

總結

以上是生活随笔為你收集整理的iw命令 linux 没有_linux下ifconfig、iwconfig、iwlist命令详解的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。