Linux 下无线网卡设置脚本

1
2
3
4
5
6
7
8
9
#!/bin/sh
IFDEV=eth1 #你的网卡
ESSID=myessid #无线网络的ESSID
PASSWORD=mypass #连接密码
 
ifconfig $IFDEV up
iwconfig $IFDEV ESSID $ESSID
iwconfig $IFDEV enc s:$PASSWORD
dhcpcd $IFDEV

Leave a comment

Your comment