Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure Linux Wireless Network

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to configure Linux wireless network". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to configure Linux wireless network.

Wireless network configuration 1. To find the wireless network card, you must first find the name of the wireless network card before you can operate it.

Iw dev

Wlp3s0 is the name of the local wireless card.

two。 Scan nearby WiFi iw wlp3s0 scan | grep SSID

SSID is the WiFi name. Find the name you are familiar with and start to connect.

3. There are two tools for connecting to WiFi: wireless-tools and wpa_supplicant. Since I have my own wpa_supplicant, wireless-tools will skip it here.

Wpa_supplicant-B-I wlp3s0-c sees the connected to indicating that the connection has been successful! Wpa_supplicant introduction: WPA is the abbreviation of WiFi Protected Access, which means "WiFi network security access" in Chinese. Wpa_supplicant is an open source project that has been ported to Linux,Windows and many embedded systems. It is the application layer authentication client of WPA, which is responsible for completing the login and encryption related to authentication. Wpa_supplicant help / / View the wpa instruction set-B means to use the daemon to execute this option in the background. -c (lowercase) specifies to use the configuration file: / etc/wpa_supplicant/wpa_supplicant.conf, if you don't have the configuration file, use this command-I refers to the interface name, that is, the wlp3s0 wireless card. WiFi has been successfully connected in the above operation, but wpa_supplicant does not have the ability to restart and disconnect automatically. 4. Configure automatic connection here you need to use the NetworkManager tool. NetworkManager introduction: NetworkManager is a project developed by RedHat (Red Hat, Portal: https://www.redhat.com/en), which is a free software project developed by a management system connected to the network and its status through D-BUS (a free software project that provides a simple way for applications to communicate with each other). It was developed as part of the freedesktoporg project. A background service for reporting, and a client program that allows users to manage network connections The advantage is: with GUI tool interface, it can greatly simplify the network connection. 1. Install NetworkManager yum-y install NetworkManager-wifi2. Start NetworkManager systemctl start NetworkManager systemctl enable NetworkManager / / set boot boot now you can use the nmcli (NetworkManagerClient) command 3. There is a problem with NetworkManager managing wifi scanning WiFi nmcli dev wifi / / scanning WiFi connection WiFi. Previously, we connected through wpa_supplicant, and then using NetworkManager connection here will cause conflicts, so here we restart network to invalidate the wap_supplicant connection, and then operate NetworkManager to connect to WiFi. Service network restart nmcli dev wifi connect $SSID password $password / / $SSID:WiFi name, $password:WiFi password nmcli conn / / View the connected WiFi, you can see the connected WiFi UUID:060c319f-3e24-4b57-976d-9a2705d2467b manages WiFi nmcli c down 060c319f-3e24-4b57-976d-9a2705d2467b according to UUID / / disable WiFi nmcli c up 060c319f-3e24-4b57-976d-9a2705d2467b / / enable WiFi nmcli c delete 060c319f-3e24-4b57-976d-9a2705d2467b / / delete WiFi systemctl restart NetworkManager / / restart 5.NetworkManager cannot automatically reconnect and troubleshoot the WiFi connection, but the landlord cannot automatically connect WiFi after rebooting countless times. Looking for related blogs on the Internet is very watery, there is no investigation process, open your mouth to order, do not explain any meaning. In this desperate situation, we have no choice but to be self-reliant. 1.NetworkManager troubleshooting process first to troubleshoot the problem, then log analysis is essential, to find the relevant log information, there are error tips to find clues to solve the problem. Less / var/log/messages / / check the linxu kernel and public message log, press G to jump to the bottom, enter? NetworkManager enter to find the relevant log of NetworkManager, press n to search, and sure enough, there are several key information clues: you can see three warn messages in the red box, the first one means "failed to cancel P2P connection: empty body information returned". The second meaning is "setting WFD IES in wap_supplicant failed because GDBUS.Error.InvalidArgs does not have this property". The third meaning is: "cannot get the requested scan result: return the wrong body (" ss ")". Analysis process: the second piece of information is critical because there are no relevant attributes that cause both the first and third items to go wrong. Baidu directly searched for "GDBUS.Error.InvalidArgs: No such property" and found no answer. In fact, you can know from the log information that NetworkManager will send a request to wpa_supplicant to get the scan information, and now the request for wpa_supplicant has failed. Then you can initially guess the compatibility between the two tools! Now that the problem is fixed and compatible, start with the tool itself, download the latest version of wpa_supplicant, and then restart NetworkManager. Yum-y install wpa_supplicant / / download the latest version systemctl restart NetworkManager / / restart NetworkManager sure enough, after installing the latest version, check the log, NetworkManager can automatically scan the WiFi information connection. Thank you for your reading, the above is the content of "how to configure Linux wireless network". After the study of this article, I believe you have a deeper understanding of how to configure Linux wireless network, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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: 204

*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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report