ts7758258 发表于 2015-10-2 09:44:24

linux wifi配置

  使用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
  



来自为知笔记(Wiz)
页: [1]
查看完整版本: linux wifi配置