码迷,mamicode.com
首页 > 系统相关 > 详细

linux wifi配置

时间:2015-04-22 10:57:10      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:

使用iwconfig命令:
搜索无线网     iwlist wlan0 scan
记下essid
连接无密码的无线网     iwconfig wlan0 essid ChinaNet 其中ChinaNet是搜索到的无线网essid
连接有密码的无线网     iwconfig wlan0 essid ChinaNet key xxxx 其中xxxx是密码
启用无线网卡     ifconfig wlan0 up
通过dhcp获取IP dhclient wlan0 或 dhcpcd wlan0


$vi /etc/network/interfaces加入以下内容
auto wlan0
iface wlan0 inet dhcp
pre-up ip link set wlan0 up
pre-up iwconfig wlan0 essid your-ssid-here
wpa-ssid your-ssid-here
wpa-psk your-passwd-here

最后重启网络$/etc/init.d/networking restart



or 

auto lo
iface lo inet loopback
   
#allow-hotplug eth0
#iface eth0 inet dhcp
   
#auto eth0
#iface eth0 inet static
#address 192.168.101.50
#netmask 255.255.255.0
#gateway 192.168.101.1
#broadcast 192.168.101.255

   

#auto wlan0

#iface wlan0 inet dhcp

#wpa-ssid YOUR-NETWORK-NAME

#wpa-key-mgmt WPA-PSK

#wpa-group TKIP CCMP

#wpa-psk YOUR-NETWORK-KEY






linux wifi配置

标签:

原文地址:http://www.cnblogs.com/weibingkitty/p/4446684.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!