Created
May 21, 2014 12:11
-
-
Save airtheva/2386226af6a38554d58d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An example of enabling WIFI and connecting to WEP/WPA/WPA2 wireless network. | |
# Here setup your network information. | |
ESSID= | |
KEY= | |
# Enable WLAN. | |
ifconfig wlan0 up | |
# Scan wireless networks. | |
iwlist wlan0 scan | |
# Connect to specified wireless network. | |
# For WEP network: | |
#iwconfig wlan0 essid $ESSID key $KEY | |
# For WPA/WPA2 network: | |
wpa_passphrase $ESSID key $KEY > $ESSID.wpa | |
wpa_supplicant -B -Dwext -iwlan0 -c$ESSID.wpa | |
# Fetch DHCP information. | |
dhclient wlan0 | |
# Check if the WIFI is correctly setup. | |
ifconfig wlan0 | |
ping 114.114.114.114 | |
# Disable WLAN. | |
#ifconfig wlan0 down |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment