Linux 下无线网卡启动脚本

Linux 下无线网卡启动脚本
不使用dhcp

1
2
3
4
5
6
#!/bin/sh
ifconfig wlan0 up
iwconfig wlan0 ESSID MYESSID
iwconfig key s:PASSWORD
ifconfig wlan0 192.168.0.xxx
route add gw 192.168.0.1


使用dhcp

1
2
3
4
5
#!/bin/sh
ifconfig wlan0 up
iwconfig wlan0 ESSID MYESSID
iwconfig key s:PASSWORD
dhcpcd wlan0

Comments (2)

Myrl Konopski九月 26th, 2010 at 11:57 上午

thank you for your sharing,i love it very much.

Hockey Skates一月 13th, 2011 at 10:42 上午

Your blog is so informative … keep up the good work!!!!

Leave a comment

Your comment