In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to configure the wireless network under Linux. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
1. Install wireless_tools and madwifi
Pacman-S wireless_tools madwifi2. Check the status of the network card
Lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 002: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse Bus 001 Device 003: ID 0cf3:7015 Atheros Communications, Inc. The network card is detected on the USB interface 001swap 003.
Iwconfig lo no wireless extensions. Eth0 no wireless extensions. Wlan0 IEEE 802.11bgn ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm Retry long limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:off wireless network card is wlan0
3. Activate the network card
Ifconfig wlan0 up because my network card must be activated before scanning, otherwise there will be an error in the next step of scan: wlan0 Interface doesn't support scanning.
4. Scan the network
Iwlist wlan0 scan wlan0 Scan completed: Cell 01-Address: 54:E6:FC:22:E1:D2 Channel:1 Frequency:2.412 GHz (Channel 1) Quality=53/70 Signal level=-57 dBm Encryption key:on ESSID: "TP-LINK_22E1D2" Bit Rates:1 Mb/s 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s 9 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=000000292a41bd80 Extra: Last beacon: 960ms ago IE: Unknown: 000E54502D4C494E4B5F323245314432 IE: Unknown: 010882848B960C121824 IE: Unknown: 030101 IE: IEEE 802.11i/WPA2 Version 1 Group Cipher: CCMP Pairwise Ciphers (1): CCMP Authentication Suites (1): PSK IE: WPA Version 1 Group Cipher: CCMP Pairwise Ciphers (1): CCMP Authentication Suites (1): PSK hair Now WPA2-PSK/WPA-PSK encrypts the network TP-LINK_22E1D2 Because the encryption method is WPA-PSK, you have to use wpa_supplicant instead of iwconfig wlan0 key xxx form, and iwconfig key mode is suitable for WEP.
5. Configure wpa_supplicant
Create a new file / etc/my_wpa_supplicant.conf
Ctrl_interface=/var/run/wpa_supplicant network= {ssid= "TP-LINK_22E1D2" psk= "password"} because it all uses the default configuration, the configuration file is very simple.
6. Connect wlan0 to the network and run as daemon
Wpa_supplicant-B-I wlan0-c / etc/my_wpa_supplicant.conf-B Background runs the-I interface-c configuration file 7. 0 in the background as daemon. Set IP address
Ifconfig wlan0 192.168.1.131ifconfig View status
Wlan0 Link encap:Ethernet HWaddr 54:E6:FC:03:0D:6B inet addr:192.168.1.131 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:95 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen: 1000 RX bytes:32434 (31.6Kb) TX bytes:576 (576.0 b) 8. Join the gateway to the route
My gateway is 192.168.1.1, add gateways accessed through wlan0
Route add default gw 192.168.1.1 dev wlan0 View status
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 000 wlan0 default 192.168.1.1 0.0.0 UG 000 wlan09. Set up.
You only need to run the following command to launch later
Wpa_supplicant-B-I wlan0-c / etc/my_wpa_supplicant.conf ifconfig wlan0 192.168.1.131 route add default gw 192.168.1.1 dev wlan010. Related command
Close the connection
Wpa_cli terminate connection status
This is the end of wpa_cli status's article on "how to configure a wireless network under Linux". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.