[参考]http://blog.csdn.net/simeone18/article/details/8580592
[方法一]
假设无线网卡代号为wlan0,无线AP的essid为:TheWiFi,密码为:ThePassword,WPA加密
- 添加如下内容至 /etc/sysconfig/network-scripts/ifcfg-wlan0
DEVICE="wlan0" BOOTPROTO="dhcp" HWADDR="00:5E:4D:1A:2C:3B" NM_CONTROLLED="no" ONBOOT="yes"
- 添加如下内容至 /etc/wpa_supplicant/wpa_supplicant.conf
network={ ssid="TheWiFi" psk="ThePassword" }
- 添加如下脚本至 /etc/rc.local
ifconfig wlan0 192.168.0.100 wpa_supplicant -B -i wlan0 /etc/wpa_supplicant/wpa_supplicant.conf
- 重启验证效果
时间: 2024-11-25 15:50:46