CentOS 6.4 64 bit version of the command line to set up a wireless network card tutorial

Time:2021-4-19

Recently, I built a server on my desktop and installed the latest 64 bit version of CentOS 6.4. Because I don’t want to use network cable, so I bought a PCI-E wireless network card and used wireless connection. The model of wireless network card is: TEDA w311p 150m PCI wireless network card

At first, we thought that it might be necessary to install a driver under Linux to recognize the network card, and Tengda also provided the linux driver of the network card. But I haven’t compiled for a long time, which is very depressing. Finally, for information, CentOS 6.4 supports this type of network card. It can be activated directly. Because through the desktop installation system, as long as you set the corresponding account and password, you can connect to the wireless network. Note that the driver does not need to be installed.

Because I installed the server, so I chose the smallest installation. In this way, you need to set the wireless network card under the command line.

Because my router uses WAP / wap2 mode. I searched the Internet and found that none of them could solve the problem. Finally, we found a WPA_ Supplicant tool, easy to use. First: see if WPA is installed_ Supplier. If it is not installed, use Yum install wpasupplier to install it. After the installation is successful, check whether NetworkManager allows it, and if so, close it. /Etc / init.d/networkmanager stop and then use WPA_ Supplicant generates your account and key file wpapassword SSID password, and you will see the generated account information

Copy code

The code is as follows:

network={
ssid=”yeestation”
#psk=”xxxxxxx”
psk=471b1b8078ce952e9c9ed70d19fa8b4fbca67673ee881c7806a9a7458a4f640d
}

Copy the text to / etc / wpasupplicant/ wpasupplicant.conf Then start wpasupplicant – iwlan0 – B – C / etc / wpasupplicant / WPA_ supplicant.conf Get IP automatically: dhclient WLAN 0

At this time, you will find that your wireless has been connected.

If you need to start automatically, write a simple bash script to $VIM wlan0.sh

Copy code

The code is as follows:

#!/bin/bash
wpa_supplicant -iwlan0 -B -c /etc/wpa_supplicant/wpa_supplicant.conf
dhclient wlan0

Then in / etc/ rc.local Add sh path / wlan0.sh to it

In this way, the system will automatically connect to the wireless network when it starts up

Recommended Today

Envoy announced alpha version of native support for windows

Author: sunjay Bhatia Since 2016, porting envoy to the windows platform has been an important part of the projectOne of the goalsToday, we are excited to announce the alpha version of envoy’s windows native support. The contributor community has been working hard to bring the rich features of envoy to windows, which is another step […]