Skip to content

Instantly share code, notes, and snippets.

@bmount
Created November 7, 2013 08:22
Show Gist options
  • Select an option

  • Save bmount/7351021 to your computer and use it in GitHub Desktop.

Select an option

Save bmount/7351021 to your computer and use it in GitHub Desktop.
linux wireless wpa quick manual configure
#!/bin/bash
if [ $# -lt 3 ]
then
echo "usage: ./setup-wifi.sh INTERFACE ACCESS_POINT_SSID PASSPHRASE"
echo "example: ./setup-wifi.sh wlan0 linksys supersecret"
exit;
fi
wpa_passphrase $2 $3 > wifi.conf
wpa_supplicant -i$1 -cwifi.conf -Dwext -B
echo "configuring... waiting 10 seconds"
sleep 10
sudo dhclient $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment