1,vi /etc/sysconfig/wpa_supplicant
INTERFACES="-iwlan0"
DRIVERS="-Dnl80211"
2,vi /etc/wpa_supplicant/wpa_supplicant.conf
添加
update_config=1
这样可以在wpa_cli中保存配置
3,启动wpa_supplicant服务
chkconfig wpa_supplicant on
4,用wpa_cli连接到网络
wap_cli -i wlan0
>add_network 0
>set_network 0 ssid "666"
>set_network 0 psk "your pre-shared key"
>enable_network 0
>save_config
>q
5,配置ifcfg-wlan0
DEVICE=wlan0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Wireless
USERCTL=yes
IPV6INIT=no
PEERDNS=yes
PEERROUTES=yes
6,重新启动网络
service network restart
wpa_cli举例
eg.1、连接无加密的AP
>add_network 0
>set_network 0 ssid "666"
>set_network 0 key_mgmt NONE
>enable_network 0
>quit
eg.2、连接WEP加密AP
>add_network 1
>set_network 1 ssid "666"
>set_network 1 key_mgmt NONE
>set_network 1 wep_key0 "your ap password"
>enable_network 1
eg.3、连接WPA-PSK/WPA2-PSK加密的AP
>add_network 2
>set_network 2 ssid "666"
>set_network 2 psk "your pre-shared key"
>enable_network 2
分享到:
相关推荐
Fedora_14_编译_OpenWrt-BackFire
Fedora_11_Installation_Guide 全英的,很有学习价值哦``
Fedora_12_Installation_Guide_in_Chinese 很好的指南文件,每次都找很久,现在放在这,找起来也方便些,也方便朋友们 查找
Windows_7下硬盘安装Fedora_15_DVD
Fedora_10_Installation_Guide_Chinese.pdf
Fedora_6_and_Red_Hat_Enterprise_Linux_宝典
亲自试过 制作 Fedora_10_live u盘启动
Fedora 14 x86_64 [快速配置].txt 新手用
Fedora_12硬盘安装 Fedora_12硬盘安装 Fedora_12硬盘安装
[Linux英文原版图书系列].MCGRAW_Hill-Red_Hat_The_Complete_Reference_Enterprise_Linux_Fedora_The_Complete_Reference.chm
Fedora Core 6 Linux 安装配置详细介绍
Fedora指南(第二版),学习Fedora的人很实用!
python库。 资源全名:fedora_elections_messages-1.0.0-py2.py3-none-any.whl
Providing thorough instructions for basic users and administrators to master Fedora and RHEL, this task-oriented book shows how to run applications, set up a small network, connect to the Internet, ...
Welcome to the Fedora 12 User Guide! This guide is intended for users who have a working Fedora 12 system and are able to use a mouse and keyboard. This guide explains: • The different desktops ...
Because of the increased reliance on powerful, networked computers to help run businesses and keep track of our personal information, entire industries have been formed around the practice of network ...
该代码是我在Linux的Fedora 9上配置拨号,串口CDMA猫拨号上的相关配置文件,ppp版本为2.4.4版本,CDMA为anydata的DTGS-800,AT指令为ATDT#777拨号上网。 实现了获得本地IP和服务器IP。 大家可以参考一下。