Answers:
试试iwconfig:
user@host:~ $ iwconfig
wlan0 unassociated Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency=2.412 GHz Access Point: Not-Associated
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
您可以使用以下代码检查分配给rpi的IP。t =“ $(ifconfig wlan0 | awk'/ inet addr / {print substr($ 2,6)}')” echo $ t w = $ {#t} echo $ w