On a Linux server, how does one check whether there is a wireless network card?

Source: Internet
Author: User

On a Linux server, how does one check whether there is a wireless network card?

Or the server in the lab. There is no interface, so I want to use some commands to link the hotspot. Of course, in Linux, the connection to wifi is not as good as win!

First, we need a basic condition: the server has a wireless network card.
[Root @ tomato2 ~] # Iwconfig
Lo no wireless extensions.

Eth0 no wireless extensions.

There is no wireless network card.


Of course, if you think you are sure you have a wireless network card, check it as follows:


[Root @ tomato2 ~] # Sudo iw dev wlan0 scan | less

Nl80211 not found.
(END)

Ah! However, there is still no wireless network card, so sad!

If there is a wireless network card, you can continue to do so !!!

------------------------------ Lili split line ----------------------------------------------

The following article

Generally, wireless interfaces are called wlan0. Of course there are exceptions, but we will always use the generic name in this tutorial.

Just in case, make sure that the interface service is started:
$ Sudo ip link set wlan0 up

Once you confirm that the wireless interface is working, you can use the following command to scan nearby wireless networks:
$ Sudo iw dev wlan0 scan | less

 

Based on the scan results, you can get the network name (its SSID), its information strength, and which security encryption is used (for example: WEP, WPA/WPA2 ). From this point on, it will be divided into two routes: Good, easy, and slightly complex.

If the network you want to connect is not encrypted, you can use the following command to connect directly:
$ Sudo iw dev wlan0 connect [network SSID]

If the network is encrypted with WEP, it is also very easy:
$ Sudo iw dev wlan0 connect [network SSID] key 0: [WEP key]

However, if the network uses the WPA or WPA2 protocol, it will be difficult to handle the problem. In this case, you have to use a tool called wpasupplicant, which does not exist by default. Modify the/etc/wpasupplicant/wpa_supplicant.conf file and add the following lines:
Network = {ssid = "[network ssid]" psk = "[Password]" priority = 1}

I suggest you add it at the end of the file and make sure that other configurations are commented out. Note that both the SSID and password strings are case sensitive. Technically, you can also regard the Access Point name as the SSID. If you use the wpa_supplicant tool, an appropriate SSID will be used to replace this name.

Once the configuration file is modified, run the following command in the background:
$ Sudo wpa_supplicant-I wlan0-c/etc/wpa_supplicant/wpa_supplicant.conf

Finally, you must obtain the IP address whether connected to an open network or an encrypted security network. Use the following command:
$ Sudo dhcpcd wlan0

So OK!

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.