debian命令行连接wifi admin 2023-08-29 16:51:01 篇首语:本文由小编为大家整理,主要介绍了debian命令行连接wifi相关的知识,希望对你有一定的参考价值。 参考技术A 按下ctrl+x退出,输入Y确定,再按下确定 这时候应该是已经连接到wifi了。 wlan0 是无线网卡的识别名称,如果你的无线网卡识别名称不是这个,换成相应名称即可。 树莓派 RaspberryPi 终端命令行配置无线网络连接wifi root@raspberrypi:~# ifconfig wlan0 uproot@raspberrypi:~#root@raspberrypi:~# iwlist wlan0 scanwlan0 Scan completed : Cell 01 - Address: 68:A0:3E:5C:CA:70 Channel:1 Frequency:2.412 GHz (Channel 1) Quality=39/70 Signal level=-71 dBm Encryption key:on ESSID:"wifi名称" Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s 11 Mb/s; 12 Mb/s; 18 Mb/s Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s Mode:Master Extra:tsf=0000000000000000 Extra: Last beacon: 10ms ago IE: Unknown: 000D436C6F7564616E745F4B485A58 IE: Unknown: 010882848B0C12961824 IE: Unknown: 030101 IE: Unknown: 0706434E20010D1B IE: Unknown: 23021E00 IE: Unknown: 46050000000000 IE: Unknown: 2A0103 IE: IEEE 802.11i/WPA2 Version 1 Group Cipher : CCMP Pairwise Ciphers (1) : CCMP Authentication Suites (1) : PSK IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00 IE: Unknown: 32043048606C IE: Unknown: 0B0507006E0000root@raspberrypi:~# vi /etc/wpa_supplicant/wpa_supplicant.confroot@raspberrypi:~#root@raspberrypi:~# cat /etc/wpa_supplicant/wpa_supplicant.confctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdevupdate_config=1country=CNnetwork={ ss key-mgmt=WPA-PSK psk="wifi密码"}root@raspberrypi:~#root@raspberrypi:~# ifconfig wlan0wlan0: flags=4099 mtu 1500 ether e4:5f:01:00:3b:a1 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0root@raspberrypi:~#root@raspberrypi:~# wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0Successfully initialized wpa_supplicantLine 7: too large scan_ssid (value=11 max_value=1)Line 7: failed to parse scan_ssid "11".Line 10: failed to parse network block.Failed to read or parse configuration "/etc/wpa_supplicant/wpa_supplicant.conf".root@raspberrypi:~#root@raspberrypi:~# vi /etc/wpa_supplicant/wpa_supplicant.confroot@raspberrypi:~#root@raspberrypi:~# cat /etc/wpa_supplicant/wpa_supplicant.confctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdevupdate_config=1country=CNnetwork={ ss scan_ssid=11 key-mgmt=WPA-PSK psk="wifi密码"}root@raspberrypi:~# wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0Successfully initialized wpa_supplicantwlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=CNwlan0: Trying to associate with SSID "wifi名称"wlan0: Associated with b8:27:c5:a7:9d:b0wlan0: CTRL-EVENT-CONNECTED - Connection to b8:27:c5:a7:9d:b0 completed [id=0 id_str=]wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0wlan0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=CNnl80211: Failed to open /proc/sys/net/ipv4/conf/p2p-dev-wlan0/drop_unicast_in_l2_multicast: No such file or directorynl80211: Failed to set IPv4 unicast in multicast filternl80211: Failed to open /proc/sys/net/ipv4/conf/p2p-dev-wlan0/drop_unicast_in_l2_multicast: No such file or directorynl80211: Failed to set IPv4 unicast in multicast filternl80211: deinit ifname=p2p-dev-wlan0 disabled_11b_rates=0p2p-dev-wlan0: CTRL-EVENT-TERMINATINGwlan0: CTRL-EVENT-DISCONNECTED bssid=b8:27:c5:a7:9d:b0 reason=3 locally_generated=1nl80211: deinit ifname=wlan0 disabled_11b_rates=0wlan0: CTRL-EVENT-TERMINATINGroot@raspberrypi:~#root@raspberrypi:~# ifconfigeth0: flags=4163 mtu 1500 inet 169.254.205.229 netmask 255.255.0.0 broadcast 169.254.255.255 inet6 fe80::e65f:1ff:fe00:3ba0 prefixlen 64 scopeid 0x20 ether e4:5f:01:00:3b:a0 txqueuelen 1000 (Ethernet) RX packets 1841 bytes 150781 (147.2 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1483 bytes 179352 (175.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 5938 bytes 341948 (333.9 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 5938 bytes 341948 (333.9 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0wlan0: flags=4099 mtu 1500 inet6 fe80::e65f:1ff:fe00:3ba1 prefixlen 64 scopeid 0x20 ether e4:5f:01:00:3b:a1 txqueuelen 1000 (Ethernet) RX packets 1 bytes 46 (46.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 75 bytes 14475 (14.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0root@raspberrypi:~#root@raspberrypi:~# reboot重启后重新连接Linux raspberrypi 5.4.83-v7l+ #1379 SMP Mon Dec 14 13:11:54 GMT 2020 armv7lThe programs included with the Debian GNU/Linux system are free software;the exact distribution terms for each program are described in theinpidual files in /usr/share/doc/*/copyright.Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extentpermitted by applicable law.Last login: Sun Aug 22 19:00:09 2021 from 169.254.205.222root@raspberrypi:~# ifconfigeth0: flags=4163 mtu 1500 inet 169.254.205.229 netmask 255.255.0.0 broadcast 169.254.255.255 inet6 fe80::e65f:1ff:fe00:3ba0 prefixlen 64 scopeid 0x20 inet6 fe80::3fa1:9571:af73:8712 prefixlen 64 scopeid 0x20 ether e4:5f:01:00:3b:a0 txqueuelen 1000 (Ethernet) RX packets 168 bytes 18457 (18.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 125 bytes 21969 (21.4 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 86 bytes 8628 (8.4 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 86 bytes 8628 (8.4 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0wlan0: flags=4163 mtu 1500 inet 192.168.3.190 netmask 255.255.255.0 broadcast 192.168.3.255 inet6 fe80::e65f:1ff:fe00:3ba1 prefixlen 64 scopeid 0x20 ether e4:5f:01:00:3b:a1 txqueuelen 1000 (Ethernet) RX packets 37 bytes 2926 (2.8 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 80 bytes 14266 (13.9 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0root@raspberrypi:~#其实到这里还没完,应该手动再配置一波,搞成静态IP(下期再说) 打完收工!我们下期见! 以上是关于debian命令行连接wifi的主要内容,如果未能解决你的问题,请参考以下文章 Cmake中的条件判断if/elseif/else 移动端关键词快速排名系统怎么样 您可能还会对下面的文章感兴趣: 相关文章 浏览器打不开网址提示“ERR_CONNECTION_TIMED_OUT”错误代码的解决方法 如何安装ocx控件 VMware的虚拟机为啥ip地址老是自动变化 vbyone和EDP区别 linux/debian到底怎么重启和关机 苹果平板键盘被弄到上方去了,如何调回正常? 机器学习常用距离度量 如何查看kindle型号